isNullable

fun KtExpression.isNullable(bindingContext: BindingContext, languageVersionSettings: LanguageVersionSettings, dataFlowValueFactory: DataFlowValueFactory, shouldConsiderPlatformTypeAsNullable: Boolean): Boolean

Return if overall expression is nullable or not nullable

var a: Int? = null
val b = a // RHS expression will be nullable
val c = a!! // RHS expression will be not nullable
val d = (a ?: error("null assertion message")) // RHS expression will be not nullable
val c = 1?.and(2) // RHS expression will be not nullable

shouldConsiderPlatformTypeAsNullable determines the behaviour of platform type. Passing true considers the platform type as nullable otherwise it is not considered nullable in case of false