firstOrNull property

T? get firstOrNull

Implementation

T? get firstOrNull => isNotEmpty ? first : null;