asDoubleOrNull

Returns this value as a JavaScript number primitive, or null when it is not one.

JavaScript number maps to Kotlin Double.