use `self.root.nil?` rather than `self.root == nil`