RoomType? getIDType(String? id) { if (id == null) { return null; } for (RoomType type in RoomType.values) { if (id.startsWith(type.prefix)) { return type; } } return null; }