Optional fields should not be included in hashCode() computation

This is a pull request for #94. 
We should probably exclude undefined optional fields from hashCode() computation.