static String getMapToString(Map<String, dynamic>? data) { if (data == null) return "null"; try { return jsonEncode(data); } catch (_) { return data.toString(); } }