toJson method Null safety

dynamic toJson()

Implementation

dynamic toJson() => (value as dynamic)?.toJson();