Check argument type & return type of :class:`typing.Union`. since it
    raises check :class:`typing.Union` using `isinstance`, so compare in
    diffrent way

    :param data: union given as a argument
    :param hint: assumed type of given ``data``

def check_union(data: typing.Union, hint: type) -> bool:
    """Check argument type & return type of :class:`typing.Union`. since it
    raises check :class:`typing.Union` using `isinstance`, so compare in
    diffrent way

    :param data: union given as a argument
    :param hint: assumed type of given ``data``

    """
    r = any(check_type(data, t)[1] for t in hint.__union_params__)
    if not r:
        raise TypeError(
            'expected one of {0!r}, found: {1!r}'.format(
                hint.__union_params__, type(data)
            )
        )
    return hint, r