JS: sandbox checks for invalid input.