Runtime type checking for JavaScript