Check that the device is valid before creating a stream.