def _check_for_type(value, name, type_):
    """Factory function to check for types"""
    if not isinstance(value, type_):
        raise ValueError(
            f'Expected {name} in {type_.__name__} format you passed:', type
            (value))
    return True
