code: public SafeUrl toSafeUrl() {
      Preconditions.checkState(
          getContentKind() == ContentKind.URI,
          "toSafeUrl() only valid for SanitizedContent of kind URI, is: %s",
          getContentKind());
      return UncheckedConversions.safeUrlFromStringKnownToSatisfyTypeContract(getContent());
    }
docs: Converts a Soy {@link SanitizedContent} of kind URI into a {@link SafeUrl}.
  
  @throws IllegalStateException if this SanitizedContent's content kind is not {@link
  ContentKind#URI}.