I added to this check because I wanted to make sure that we did not end up in this part of the if if the item we have clicked on is not clickable (a good example would be a root node)