Runtime safety for types in node.js