Nitpick: I like to use early returns for these kinds of 'guard' conditions.