1 line dirty typecheck snippet from underscore.js for typechecking in javascript