checkZeroDivisionOrUselessCondition: Refactoring