[misc] Simplify the IF check.