import typing


def is_instance(obj: typing.Any, typ: typing.Type) -> bool:
    """Test if object is an instance of given type. Supports some additional types compared to the builtin."""
    if typ == typing.Any:
        return True
    return isinstance(obj, typ)