Fix #52: verify if an object is an instance of a Node before casting to a Node in Node.equals