def is_type_of(value, other) -> bool:
    """Type check that performs lookup on parameterized generic types.
    For singular primary types this check is very fast ans just
    calls isinstance.
    For SpecialForm annotations like Union and Parametrized types like T[T]
    or T[T, T] then this is a bit more costly.
    NOTE: Find ways to improve the execution time on this, like
    caching same value -> same type
    """

    origin = get_origin(other)
    args = get_args(other)

    if not args and isinstance(other, tuple):
        # Got (T[T],) from recursive call
        return any(is_type_of(value, item) for item in other)

    if args:
        if origin in [Union, UnionType]:
            return any(is_type_of(value, arg) for arg in args)
        elif origin in (list, tuple):
            return isinstance(value, (list, tuple)) and all(
                is_type_of(item, args) for item in value
            )
        elif origin is dict:
            k_type, v_type = args
            return isinstance(value, dict) and all(
                is_type_of(k, k_type) and is_type_of(v, v_type)
                for k, v in value.items()
            )

    if getattr(other, "_dynaconf_dictvalue", None):
        other = dict

    return isinstance(value, other)
Type check that performs lookup on parameterized generic types.
    For singular primary types this check is very fast ans just
    calls isinstance.
    For SpecialForm annotations like Union and Parametrized types like T[T]
    or T[T, T] then this is a bit more costly.
    NOTE: Find ways to improve the execution time on this, like
    caching same value -> same type
    
dynaconf/validator_conditions.py