def is_types_spec(types) -> bool:
    """Returns True iff input types is a type or an iterable of types"""
    if isinstance(types, type):
        types = (types,)
    try:
        return len(types) > 0 and all(isinstance(x, type) for x in types)
    except Exception:
        return False