factory Reference.fromMap(Map<String, Object?> value) { assert(value.containsKey(Keys.type)); return Reference._(value); }