avoid NPE in namedetails preference and specimen preference page