code: protected void checkAttribute(String attribute) {
          if (!hasAttribute(attribute)) {
              String sb = "Attribute: '" + attribute + "' is not defined in model: '" + getModelClass() + ". "
                      + "Available attributes: " +getAttributeNames();
              throw new IllegalArgumentException(sb);
          }
      }
docs: Checks if this model has a named attribute that has the same name as argument.
  
  Throws <code>IllegalArgumentException</code> in case it does not find it.
  
  @param attribute name  of attribute or association target.