The stabilizing effect of d orbitals on the central nitrogen atom in nitrogen-oxygen molecules and ions