Refactor the block into a method for the actual check (reduce NCSS)