Added validation for the number of neighbors