Correlation of electron spin resonance and optical absorption of K atoms in solid Ar