double? getDouble(String key) { if (attrs[key].isEmpty) return null; return double.tryParse(attrs[key]!); }