Fixes an issue where exceptions where thrown if no titles could be found

(such as when an image non-html document was linked.)