import ast


def string_to_list(a_string):
    """Converts a string representation of list to list.
    Args:
        a_string: list output recieved as string.
            No quotes around any values: e.g: '[abc, def, 786, hil]'
    Returns: object of list type.
             Empty list is put as None.
    """
    if a_string == '[]':
        return ast.literal_eval(a_string)
    else:
        a_string = a_string.replace("[", "['").replace("]", "']")
        a_string = a_string.replace(",", "','")
        a_list = ast.literal_eval(a_string)
        a_list = [ele.strip() for ele in a_list]
        return a_list