if ( defined($ret->{val1}) == defined($this->{val1}) && ($ret->{val1}||"") eq ($this->{val1}||"") ) ...