might consider moving this to the end of the function and doing an early return, if you feel comfortable with that. As this if-statement could be confusing for future users & readers of the code.