Updated expandChecked() method

Fixed issue when the tree has no root checkbox.