protected void validateField() throws Exception {
    // do some type checking here
    if (m_fieldDefs != null) {
      Attribute a = getFieldDef(m_fieldName);
      if (a == null) {
        throw new Exception("[FieldRef] Can't find field " + m_fieldName
            + " in the supplied field definitions");
      }
      if ((m_opType == FieldMetaInfo.Optype.CATEGORICAL ||
          m_opType == FieldMetaInfo.Optype.ORDINAL) && a.isNumeric()) {
        throw new IllegalArgumentException("[FieldRef] Optype is categorical/ordinal but matching "
            + "parameter in the field definitions is not!");
      }
      
      if (m_opType == FieldMetaInfo.Optype.CONTINUOUS && a.isNominal()) {
        throw new IllegalArgumentException("[FieldRef] Optype is continuous but matching "
            + "parameter in the field definitions is not!");
      }
    }
  }