fix hist_find crash with non-u8/u16 input