Bug fix of the histogram observers (#30970)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30970
Check null tensors in the histogram observers
Test Plan: f154576636 vs f154820243
Reviewed By: hx89
Differential Revision: D18865771
fbshipit-source-id: 669c014d914525deee36142e12f013afaf3caf1d