uci:set_list() will delete the list when nil is passed, so there is no need to differentiate between the cases.