new function to set type information for a (new) collection
add type check to set_template_object