Add missing semicolon
Check if the WebSocket is available

This happens when a previous connection is still established for the choosen
tab, in this case the JSON tab object doesn't have the 'webSocketDebuggerUrl'
field.
Use Error object for errors
Clarify the use of the field 'id'