[#1178] Simplify "if" expression, removing redundancy