from typing import Union


def is_inet_address(addr: Union[tuple[str, int], str]) -> bool:
    """Check whether addr is of type tuple[str, int]."""
    return (
        isinstance(addr, tuple)
        and len(addr) == 2
        and isinstance(addr[0], str)
        and isinstance(addr[1], int)
    )