@staticmethod
def is_list_arg(arg=None, types=None):
    """
        Returns True if the given arg is a list and all items in that list are instances of given types ele returns False
        If types is None (default), the type of each item is not tested
        :param arg: variant, value to validate as a list
        :param types: class or list of types and/or classes
        :return: bool
        """
    result = isinstance(arg, (tuple, list))
    if result and types is not None:
        for a in arg:
            if not isinstance(a, types):
                result = False
                break
    return result
