Fix get_type_of_id (unuseful copy of collections) instead of adding a new dedicated method