added StatisticsMetric to measure diff in min, max, and mean; added null check for map.get() in SortOrderMetric