Implement is operator in node.js backend