def aslist(val):
    """Converts a comma-separated value string into a list

    :param val: value to convert, either a single value or a comma-separated string

    :return: list representation of the value passed in
    :rtype: list of strings
    """
    if val is None:
        return []
    if isinstance(val, list):
        return val
    return str(val).replace(" ", "").split(",")