Would need to see full code and the parameters you pass to the function for a more complete answer.
But in the first case either par did not equal one, strokes did not equal one, or neither equalled one.
In the second case you, presumably pass in par so that is true and strokes must have been passed in as one so that would be true. But where the confusion might be is that in the second case the code does not check whether par equals one, it checks whether par is defined and checks whether strokes equals one.