I have a data class (given below)
data class Request(val containerType: String,
val containerId: String)
which i’m calling as a param in another function like given below
fun someLogicalFunction(request: Request) {
// validate if request is not null here
if(request == null) { // i know this is wrong, what can be done for this?
// do something
} else { // do something }
}
How do check if request is not null directly in kotlin?