In an intuitive usage of
`org.apache.tika.langdetect.OptimaizeLangDetector` might/will be chosen as default detector, but since there's no call to `LanguageDetector.loadModels()` `LanguageDetector.detector` is `null` in `detectAll` which causes an unhelpful error situation which one has to investigate in the code. A simple check whether `detector` is `null` and throwing an `IllegalStateException("models haven't been loaded yet (forgot to call loadModels?")` would be much more intuitive.
If that corresponds to the expected behaviour (it's my first week with Tika), I can provide a patch or pull request.
experienced with 1.16-75-g4455a6f08