code: Object encodeOutcome(T t, Throwable x) {
      return (x == null) ? (t == null) ? NIL : t : encodeThrowable(x);
    }
docs: Returns the encoding of the given arguments: if the exception is non-null, encodes as
  AltResult. Otherwise uses the given value, boxed as NIL if null.