JS Maybe Monad Patter