valueOrNullIfPresent

inline fun <T> Map<String, Any?>.valueOrNullIfPresent(key: String, ifPresent: (T?) -> Unit)

Same as valueIfPresent, but runs ifPresent even when the value isn't an instance of T — passing null in that case (via as?) instead of skipping the call. Only skips entirely when key is absent.