sizeOf function Null safety

int? sizeOf(
  1. dynamic type
)

Implementation

int? sizeOf(dynamic type) {
    if (type is String) return _sizeOf[type];
    if (type is Enum) return 1;
    return null;
}