Map<String, dynamic>? asStringMap(dynamic value) { if (value is Map) { return value.map((k, v) => MapEntry(k.toString(), v)); } return null; }