code: public static boolean nullSafeEquals(@Nullable final Object o1, @Nullable final Object o2) {
      if (o1 == o2) {
        return true;
      }
      if (o1 == null || o2 == null) {
        return false;
      }
      if (o1.equals(o2)) {
        return true;
      }
      if (o1.getClass().isArray() && o2.getClass().isArray()) {
        return ObjectUtils.arrayEquals(o1, o2);
      }
      return false;
    }
docs: Determine if the given objects are equal, returning {@code true} if both are {@code null} or
  {@code false} if only one is {@code null}.
  <p>
  Compares arrays with {@code Arrays.equals}, performing an equality check based on the array
  elements rather than the array reference.
  
  @param o1 first Object to compare
  @param o2 second Object to compare
  @return whether the given objects are equal
  @see Object#equals(Object)
  @see java.util.Arrays#equals