assertNullOrValidMapValue function

void assertNullOrValidMapValue(
  1. Map m,
  2. String k,
  3. Type t
)

Assert that the value for key k in Map m is non-null and is of Type t. Throws an ArgumentError if the value is null, or is not of Type t.

Implementation

void assertNullOrValidMapValue(Map m, String k, Type t) {
  var v = m[k];
  if (v == null) {
    return;
  } else {
    return assertValidMapValue(m, k, t);
  }
}