code: public static boolean areObjectsEqual(Object obj1, Object obj2) {
          boolean equal = false;
          if(obj1 == null && obj2 == null) {
              equal = true;
          } else {
              if(obj1 != null) {
                  if(obj1.equals(obj2)) {
                      equal = true;
                  }
              }
          }
          return equal;
      }
docs: Check if the two of the given objects are equal with their {@link Object#equals(Object)}
  methods. It's safe to pass NULL as the objects, and when they are both NULL they will be
  considered equal.
  @param obj1
  @param obj2
  @return