Runtime types checking for JavaScript