We parse the JSON payload, but then it wasn't being referred to when we
were checking the data type, which could lead to looking at the `type`
attribute of a string.
When inside the onmessage function, `this` no longer refers to the
websocket node. It needs to be accessed with `that`, which is where we
stored it previously.