static String checkString(dynamic input, String fieldName) { if (input is String) return input; throw FormatException("Expected String for '$fieldName', got ${input.runtimeType}"); }