code: public Type toNonNull() {
          if (isNonNull()) {
              return this;
          }
          else {
              return new Type(this) {
                  private static final long serialVersionUID = 1L;
  
                  public boolean isNonNull() {
                      return true;
                  }
  
                  public boolean isNullable() {
                      return false;
                  }
  
                  public Type toNullable() {
                      return Type.this;
                  }
              };
          }
      }
docs: Returns this type converted such that it cannot reference null.