fix style issue "Eliminate redundant if expressions where both branches return constant booleans"