import typing


def is_union_type(type_):
	"""Check if a type is :data:`typing.Union` or a parameterized version of it.

	param type_: Type object to check.
	:type: bool

	>>> from typing import Union
	>>> is_union_type(Union)
	True
	>>> is_union_type(Union[int, str])
	True
	>>> is_union_type(Union[int])  # just returns int
	False
	>>> is_union_type(int)
	False
	"""
	return isinstance(type_, type(typing.Union))