def Type(expected, message="Not of type {}"):
    """
    Creates a validator that compares the type of the given value to
    ``expected``. This is a direct type() equality check. Also see
    ``Instance``, which is an isinstance() check.

    A custom message can be specified with ``message``.
    """
    @wraps(Type)
    def built(value):
        if type(value) != expected:
            raise Error(message.format(expected.__name__))
        return value
    return built