Added a check for null location, display Alert Dialog if location is null