Map<String, dynamic> toJson() { return <String, dynamic>{ if (person != null) r'person': person, if (self != null) r'self': self, }; }