Checking whether a post has any categories before proceeding with the template lookup.