Replaced `Maybe` monad with `error`
(`Maybe` allows you to fail more gracefully, but it's more complex)