code: @SuppressWarnings("unchecked")
    T result(final Object r) {
      return (T) (r == NULL ? null : r);
    }
docs: Convert the result object to a result.
  
  <p>Takes {@link #NULL} into account.
  
  @param r the result object
  @return result