def METHOD_NAME(t: Type) -> bool:
    origin = get_origin(t)
    if origin == Optional:
        return True
    if origin == Union:
        # Cover case where Optional[a] is reported as Union[a, None]
        args = get_args(t)
        if len(args) == 2 and type(None) in args:
            return True
    return False