readScore function Null safety

int? readScore(
  1. Object score
)

Implementation

int? readScore(Object score) => score is int ? score : null;