Done, and also changed object.type to object.objectType due to the document.