Is this a good usecase for `runCatching`?

val dob = when { dobString.isNullOrEmpty() -> null else -> runCatching { LocalDate(dob) }.getOrNull() }

I’m asking, because runCatching can be misused as a catch-and-ignore-all construct. Is this example misuse, or ok, concise and idiomatic?

submitted by /u/erikieperikie
[link] [comments]