identityOrNull property

Identity? get identityOrNull

Returns Identity if this data is Identity, otherwise null.

Implementation

Identity? get identityOrNull => isIdentity ? identity : null;