stringValueOrNull

fun JsonElement.stringValueOrNull(vararg keys: String): String?

Navigates to the nested element at keys and returns its string value, or null if not found. Extension function on JsonElement.