longOrNull

val JsonPrimitive.longOrNull: Long?

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