from typing import Any
from typing import Union
from typing import List


def isType(val: Any, typeArr: Union[List[Any], Any]) -> bool:
    """Helper that checks if the supplied value `val` is of a specific type or of a type present in `typeArr`"""

    if isinstance(typeArr, List):
        anyMatched = False

        for type in typeArr:
            if isinstance(val, type):
                anyMatched = True

        return anyMatched
    else:
        if not isinstance(val, typeArr):
            return False
    return True