Use next instead of if at end of itereation

there is a new cop comming `Next` that is looking for this