Fix NPE when converting from HTML.