A JavaScript module for checking variable runtime type