Fix #52: verify if an object is an instance of a Node before casting to a Node in Node.equals
Merge pull request #53 from ftomassetti/issue52

Fix for issue #52