int? getIntOrNull(String key) { if (has(key)) { return int.tryParse(jsonObject[key].toString()); } return null; }