readTimestamp function
v (milliseconds since the epoch, UTC; or an ISO 8601 string) as a
time, or null.
Implementation
DateTime? readTimestamp(Object? v) => switch (v) {
final num n when n.isFinite => DateTime.fromMillisecondsSinceEpoch(n.round(), isUtc: true),
final String s => DateTime.tryParse(s)?.toUtc(),
_ => null,
};