The end condition in the binary search loop in the new getType() was