asIntOrNull

Coerces element to an Int by routing through asString then toIntOrNull, returning null when the string is not a valid integer representation.

Return

the value as an Int, or null when not parseable as an integer.

Parameters

element

the value to coerce; may be null.