def _none_or_int_or_list(val):
    """Input conversion - expecting None, int, or a list of ints"""
    if val is None:
        return None
    elif isinstance(val, list):
        return list(map(int, val))
    else:
        return int(val)