improved NullCompatibleEquivalence and added tests