int toIntSafe({int defaultValue = 0}) { if (this == null) return defaultValue; return int.tryParse(this!.trim()) ?? defaultValue; }