SHDP-246 Fix wrong null check