Added support for initializing objects with both 'type' and 'className' properties.