I think if the loop is right this `if` statement shouldn't be necessary