def METHOD_NAME(obj, dtype: Union[type, Tuple[type, ...]]):
    """Check if an object has a specific dtype."""
    if not isinstance(obj, dtype):
        raise ValidationError(f"The dataobject is expected to be one of ({dtype},). But it is a {type(obj)}")