Fix issue with Segfault in ASR models
Signed-off-by: smajumdar <titu1994@gmail.com>

# What does this PR do ?

Fixes a segfault in nemo ASR models due to hydra / omegaconf access during DDP.

**Collection**: [ASR]

# Changelog 
- Add new flag and method to pre-allocate the value of the check
- Update skip_nan_grad code to support global DDP access.

# Before your PR is "Ready for review"
**Pre checks**:
- [ ] Make sure you read and followed [Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md)
- [ ] Did you write any new necessary tests?
- [ ] Did you add or update any necessary documentation?
- [ ] Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
  - [ ] Reviewer: Does the PR have correct import guards for all optional libraries?
  
**PR Type**:
- [ ] New Feature
- [x] Bugfix
- [ ] Documentation
