Quick check for null pointer when getting location