I had the same problem with lists, now it is Map.
The following syntax is not Dart, as in it does not
Or
map != null ? map[key]: otherValue;
which checks to see if the map is null before attempting to access the variable, which is the same as Günter's answer but checks first.