I'm not sure about this.  Won't this do value comparison, since you dereference the data pointer?  Is that needed, rather than just directly pointer comparison?