checked if city is defined or not