Polarization gradient induced electron shelving in cold helium atoms in an optical lattice: effect of axial magnetic field