booleanOrNull

val JsonPrimitive.booleanOrNull: Boolean?

Returns content of current element as boolean or null if current element is not a valid representation of boolean