Better comparison of different keys which have nil values.