Catch also IllegalArgumentException when converting an URI to an URL