code: public static boolean areObjectsEqual(Object a, Object b) {
          return (a == b) || (a != null && a.equals(b));
      }
docs: areObjectsEqual, This function exists as a workaround for the fact that Objects.equals() did
  not exist in Java 1.6.
  
  Returns {@code true} if the arguments are equal to each other and {@code false} otherwise.
  Consequently, if both arguments are {@code null}, {@code true} is returned and if exactly one
  argument is {@code null}, {@code
  false} is returned. Otherwise, equality is determined by using the
  {@link Object#equals equals} method of the first argument.
  
  @param a an object
  @param b an object to be compared with {@code a} for equality
  @return {@code true} if the arguments are equal to each other and {@code false} otherwise
  @see Object#equals(Object)