Avoiding error then getting city