Add support to serialize class type on _type attribute