Check if Preference fragment is valid (fix crash on tablets)