NIT: Lots of opportunity for early returning. I'd also flip the conditional so the shorter case is first.