def validate_type(input, *types):
    """Raise TypeError if the type of ``input`` is one of the args

    If the input value is one of the types specified, just return
    the input value.

    """
    if not isinstance(input, types):
        raise TypeError('Input expected to one of following types: %s' % (
            types,))
    return input
