Simplifying slightly with Either monad