My understanding is that toURI() and toURL() cannot return null based on the Javadocs for File and URI.