move all null-checks to the pref manager