import itertools


def merge_lists(list_of_lists):
    """
    Join a lists of lists into a single list. 
    Returns an empty list if the input is not a list, 
    which is expected to happen (from the ngrammer) 
    if no long text was found
    """
    if type(list_of_lists) is not list:  # expected to happen if ngrammer skipped this row
        list_of_lists = []
    iter_ = itertools.chain.from_iterable(list_of_lists)
    return list(iter_)