Get map value by key as int.
int? getInt(String key) { if (!this.containsKey(key)) { return null; } if (this[key] is! int) { return null; } return this[key]; }