def METHOD_NAME(data: dict, key: str) -> int | None:
    """
    Convert the value of the key `key` in `data` to an integer.
    Returns None if the value is not convertible to an integer, or
    if the value doesn't exist.
    """
    value = data.get(key)
    if bool(value):
        if isinstance(value, str) and value.isdigit():
            return int(value)
        elif isinstance(value, int):
            return value
    return None