@Functional
  public @Nullable Boolean asBooleanObject() {
    switch (this) {
      case YES:
        return Boolean.TRUE;
      case NO:
        return Boolean.FALSE;
      case UNSET:
        return null;
      default:
        throw new IllegalStateException("Unrecognized TriState value: " + this);
    }
  }
Returns the {@code Boolean} value that corresponds to this {@link TriState}, if appropriate.

@return {@link Boolean#TRUE} if {@code this} is {@link TriState#YES} or {@link Boolean#FALSE}
    if {@code this} is {@link TriState#NO} or {@code null} if {@code this} is {@link
    TriState#UNSET}.
fbcore/src/main/java/com/facebook/common/util/TriState.java