Make variable to list.

    >>> _to_list(None)
    []
    >>> _to_list('whee')
    ['whee']
    >>> _to_list([None])
    [None]
    >>> _to_list((1, 2, 3))
    [1, 2, 3]

    :param var: variable of any type
    :return:    list

def _to_list(var):
    """
    Make variable to list.

    >>> _to_list(None)
    []
    >>> _to_list('whee')
    ['whee']
    >>> _to_list([None])
    [None]
    >>> _to_list((1, 2, 3))
    [1, 2, 3]

    :param var: variable of any type
    :return:    list
    """
    if isinstance(var, list):
        return var
    elif var is None:
        return []
    elif isinstance(var, str) or isinstance(var, dict):
        # We dont want to make a list out of those via the default constructor
        return [var]
    else:
        try:
            return list(var)
        except TypeError:
            return [var]