from typing import Any
from typing import Union


def check_is_union(data_type: Any) -> bool:
    """Check if `data_type` is based on a `typing.Union`."""
    return hasattr(data_type, '__origin__') and \
        data_type.__origin__ is Union