Make sure preference isn't null