Checking correct instantiation of MqttClient