For ENG-5805, guard against empty histograms