u can use the !! instead if u want the program to throw null and only forces non null value
@Composable fun MyComposeUI(camera: USBCamera?) { Button(onClick = { camera!!.setGain(10) }) {} }