Yes, it seems to be right. We are using "!=" here.

Also, we might want to do "return NULL" instead of plain "return".