After talking with Mark W. it does not seem that the if lines are needed