def __check_colnames_type(cols):
    """Check if it is a list-like object."""
    if cols is None or cols == []:
        return None
    elif not isinstance(cols, list):
        raise TypeError(
            'Third item of the tuple (func, args, cols) must be list-like object not a {} object'
            .format(type(cols)))
    else:
        return cols
