My take on the Maybe monad in JavaScript