from typing import Optional
from typing import Union


def type_union(*args: type) -> Optional[type]:
    """Finds the union of types, eliminating `None` where possible."""
    union_t = None
    for t in args:
        if union_t is None:
            union_t = t
        elif t is not None:
            union_t = Union[union_t, t]
    return union_t