nir/validate: fix null deref coverity warning