Returning right type or throwing exception in class value. First implementation of method get_collection_