Amended root.type to return boolean