Avoid a null pointer when Bluetooth is not connected.