remove attribute checking on attachTo; check nodeType for Doctype