Rework if condition for toggling item highlight.