nullAs

fun <T> PatchField<T>.nullAs(replacement: T): PatchField<T>(source)

Returns Value of replacement for Value(null), otherwise this field unchanged.

For a property that is never null, such as a collection, an explicit null then means replacement (e.g. an empty list), while Unset still leaves the property untouched.