toUriOrNull

fun toUriOrNull(iri: String): URI?

Attempts to parse iri as a URI, returning null on failure instead of throwing.