Use optional return if JSON cannot be parsed

Return an optional JSValue just in case the json cannot be parsed.  Right now it throws an exception.