spelling error in comment
check if root != nil