Add missing None check for hf_quantizer (#28804)
* Add missing None check for hf_quantizer
* Add test, fix logic.
* make style
* Switch test model to Mistral
* Comment
* Update tests/test_modeling_utils.py
---------
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>