No that's fine, the if in line 419 is the same as in line 417.
You can simply remove the if in line 419.