Assert if obj not exists, otherwise throw error message.
bool shouldNull(Object? obj, String errmsg) { if (obj != null) throw FlutterError(errmsg); return true; }