The check is here because instantiating the HubProxy with a mocked up IConnection will not work if the JsonSerializer is null.