Add isHeap variant without helper function