List<String> nullOnlyListToJson(List<enums.NullOnly>? nullOnly) { if (nullOnly == null) { return []; } return nullOnly.map((e) => e.value!).toList(); }