private static void ValidateDictionaryTypeAgainstFieldType(ScalarValue priorValue, FastType type) { if (priorValue == null || priorValue.IsUndefined) { return; } if (!type.IsValueOf(priorValue)) { Global.ErrorHandler.OnError(null, DynError.InvalidType, "The value '{0}' is not valid for the type {1}", priorValue, type); } }