Fixed comparing object with null values