private static Boolean nullCompare(Object obj1, Object obj2, int compOp) {
    Boolean result = null;

    switch (compOp) {
      case TOK_EQ: {
        if (obj1 == null) {
          result = obj2 == null;
        } else { // obj1 is not null obj2 must be
          result = Boolean.FALSE;
        }

        break;
      }

      case TOK_NE: {
        if (obj1 == null) {
          result = obj2 != null;
        } else { // obj1 is not null so obj2 must be
          result = Boolean.TRUE;
        }

        break;
      }
    }

    return result;
  }
@return a Boolean, or null if UNDEFINED.
geode-core/src/main/java/org/apache/geode/cache/query/internal/types/TypeUtils.java