test presence of type_name for complex vs simple objects, add unit test