code: private final static boolean valuesMatch(Object value1, Object value2) {
          if (value1 == null) {
              return value2 == null;
          } else {
              return value1.equals(value2);
          }
      }
docs: returns whether the two objects are either both null or equal