Semigroup + Monad for doing validations in Javascript