Added a test for best with nan outcomes
Fixed best() when there are nans