..so, what about the first bit of my question?
That check is a standard way of dealing with objects composed of others objects which can be NULL. Basically, you start off with a prime, keep adding the hash codes of the constituent objects and use 0 if a given field is NULL (since you can't invoke hashCode() on a NULL reference).