Assuming the $\mid k \rangle $ are orthogonal, you have written down a unitary operator. A matrices is an examples of normal operators and normal operators have a spectral decomposition.
It is not so standard, but one can consider unitary or even normal operators as observables, but they are complex-values observables.
More standard is to use two real observables that are compatible to give the same information. Essentially the real and imaginary parts of the complex observable. In your case, one would be the sum of $\cos(k) \mid k \rangle\langle k \mid $ and the other the sum of $\sin(k) \mid k \rangle\langle k \mid $.
This issue comes up all the time with position on a finite system with periodic boundary conditions. Perhaps your professor had in mind one of the approaches above.