Mojarra API's for ExternalContext.getResource() states that a NulPointerException should be thrown if path is null.
Right now no no exception is throw at all.
If you pass in null you get null in return.
According to the ServletContext.getResource() API's it states the following:
the resource located at the named path, or null if there is no resource at that path
java.net.MalformedURLException - if the pathname is not given in the correct form