ensure input to HEAP[U]8 is an int