Added a checker to result of heapify