add error handling for bad xtype in embeddedserializer