cowToCowId function Null safety

String? cowToCowId(
  1. Cow? _
)

Implementation

String? cowToCowId(Cow? _) => _ != null ? _.id : null;