Allows you to serialize object.
Map<String, dynamic> toJson() => { "notAfter": notAfter?.toJson(), "notBefore": notBefore?.toJson(), }.clearNulls();