Correct a crash in checking Location.