Handle null location correctly