firstOrNull method

T? firstOrNull()

Implementation

T? firstOrNull() => isNotEmpty ? first : null;