Add isSuccess and isError to JsResult

Fixes #2215