Converts this ModelHint into a JSON-compatible map.
@override Map<String, Object?> toMap() { return {if (name != null) 'name': name}; }