anchor.diff:      // Check the keys are integers or strings.
       final dynamic keys = value.keys;
       var keysValid = true;
  -    for (final dynamic element in keys) {
  -      final elementType = element.runtimeType;
  -      if ((elementType is! int) || (elementType is! String)) {
  +    for (final element in keys) {
  +      if ((element.runtimeType != int) || (element.runtimeType != String)) {
           keysValid = false;
           break;
         }
  
positive.code:     var ok = true;
      for (final dynamic element in value) {
        var valType = element.runtimeType;
        switch (valType) {
          case int:
            _writeInt(element);
  
negative.code:     value.forEach((key, val) {
        // Encode the key, can now only be ints or strings.
        final keyType = key.runtimeType;
        if (keyType is String) {
          _writeString(key);
        } else {
          _writeInt(key);
        }
        // Encode the value
        var valType = val.runtimeType;
        if (valType is List) {
          valType = List;
        }
        if (valType is Map) {
          valType = Map;
        }
        switch (valType) {
          case int:
            _writeInt(val);
  