Cleanup converting PrimitiveType