convert the input to a string
String toString(Object? input) { if (input == null || (input is List && input.isEmpty)) { input = ''; } return input.toString(); }