asBooleanOrNull

Returns this value as a Boolean, or null if the value is null or not a Boolean.