code: public static <T> T[] createIfNull(T[] arguments) {
          if (arguments == null) {
              return (T[]) new Object[0];
          } else {
              return arguments;
          }
      }
docs: Returns a new empty array if the passed array is null.