from typing import Any


def _check_valid_type(tag: Any, *types: type) -> bool:
    """Checks the type of tag against all given types."""
    for data_type in types:
        if isinstance(tag, data_type):
            return True
    return False