code: public void addBadValueError(final String type, final JSONValue val) throws ValidationException
      {
          addError(StringFormatter.format(MessageConstants.MESSAGES.invalidValueForType(), type, val));
      }
docs: Calls {@link #addError(String)} with a message that indicates
  that a node has the wrong JSON type,
  e.g. we're expecting a String but the value was a Number.
  
  @param type expected Node or Shape type
  @param val JSONValue that caused the error
  
  @throws ValidationException