com.xpn.xwiki.plugin.tag.TagPlugin.getTagsFromDocument(XWikiDocument) does not check the result of document.getObject(TAG_CLASS).safeget(TAG_PROPERTY), which is null for a document without tags.