cupid: More robust test for range of values in input data