simplify if statement.

If the first part of a logical OR `||` is `true` the second part will never be executed. Therefore the if statement can be simplified.