Pragmatic runtime type checking for JavaScript