The API you are looking for has been introduced in recent Kotlin builds (0.13.213+). Now you can take the type of the property and find out if it was marked as zero in the source code:
val property = ... if (property.returnType.isMarkedNullable) { ... }
source share