Composition of oxides and nitrides from line shapes of metal core level x‐ray photoelectron spectra