longOrNull

abstract val longOrNull: Long?(source)

The numeric value as Long if isNumber and the value is representable as a Long without data loss; null otherwise.

Return

The long value, or null if the primitive is not a number or has a fractional component.