code: private static void checkFeatureType(Feature feature, String expectedType)
        throws AnalysisEngineProcessException {
      if (!feature.getRange().getName().equals(expectedType)) {
        throw new OpenNlpAnnotatorProcessException(
            ExceptionMessages.WRONG_FEATURE_TYPE,
            new Object[] {feature.getName(),
                expectedType
            });
      }
    }
docs: Checks if the given feature has the expected type otherwise
  an exception is thrown.
  
  @param feature
  @param expectedType
  
  @throws AnalysisEngineProcessException - if type does not match