def ensure_list_type(elem):
    """
    Transforms the argument elem into a list if it's not already its type.
    :param elem: Element to transform into a list.
    :return: A list containing the element, or the element if it is already a list.
    """
    if type(elem) != list:
        elem = [elem]
    return elem
