Protection in case heap isn't defined.
Corresponding js.