static void writeModelNotNull( Map<String, dynamic> data, String key, Model? model) { if (model != null) { data[key] = model.toData(); } }