type checking in monad evaluation