List? castListNullable(List list, Type type) { if (type == this.type) { return List<O?>.from(list); } return null; }