code: @NonNull
      public static <T> T nonNullResult(@Nullable T result, String call) {
          if (result == null) {
              // XXX: IllegalStateException might not be the best choice
              throw new IllegalStateException(String.format(
                      "call of '%s' yielded unexpected null value", call));
          }
          return result;
      }
docs: Asserts that a method call yielded a non-null result.
  
  @param <T> Type of the object to test.
  @param result The result object.
  @param call A String description of the call, like "Object.calledMethod".
  @return The object which was passed in.
  @throws IllegalStateException If {@code result} is <code>null</code>.