Fixed the cases where an instance is not classified and an error in the
KNN when we have already checked all the neighbours and the data
structure was empty.