Update hal.js to check for form first