hide the arrow if item is null
toggle collapsed only when there are sub-items