Runtime type assertions for function arguments in Node.js