[Truffle] Move type check of $~ into a separate node.