Updated equality check to deal with value types.
Merge pull request #1 from TimWilde/master

Update to equality check to deal with value types