List<String>? parseListString(Iterable<dynamic>? json){
  if(json==null) return null;
  return List<String>.from(json);
}

T? cast<T>(x) => x is T ? x : null;

bool isNumeric(String? s) {
  if (s == null) {
    return false;
  }
  return double.tryParse(s) != null;
}

String formatDecimal(double value) {
  if (value % 1 == 0) return value.toStringAsFixed(0).toString();
  return value.toString();
}