@veens: There is no way that == doesn't work.
== is a comparison operator that compares the referenced value of object.
What you will be trying to do is comparing the contents, not the referenced...