Prevent checkVisibility crash on code comments