might I suggest to change this to an if and switching the branches around? That way you get the regular path up front, and the error conditions bundled together.

(btw, I feel that since this is on the exercism codebase, people appreciate style comments as well, if you don't, please say so)