k-means: add n_init argument check

Attempts to address #3842 .
Please put everything on a single line when it fits in less than 80 columns.