fail if err != nil for non-empty heaps