Checking if the city is null to prevent NPE