Map<String, dynamic>? asMap(String key) { final value = this[key]; if (value == null) { return null; } if (value is Map<String, dynamic>) { return value; } return null; }