Optimized handling of types and attribbutes