Better type checking for JavaScript.