def is_instance_factory(_type):
    """

    Parameters
    ----------
    `_type` - the type to be checked against

    Returns
    -------
    validator - a function of a single argument x , which returns the
                True if x is an instance of `_type`

    """
    def inner(x):
        if not isinstance(x, _type):
            raise ValueError("Value must be an instance of '%s'" % str(_type))

    return inner