Helium abundances and its radial gradient from the spectra of H ii regions and ring nebulae of the Milky Way