from typing import Optional


def get_city_id(data: dict) -> Optional[int]:
    """
    Returns the city id of the record in question
    :param dict data: The record in question
    :return Optional[int]: The city id as an integer, 0 if it can't find it.
    """
    try:
        return data["event"]["data"]["new"]["city_id"]
    except (TypeError, KeyError):
        return None