Allow empty or nil categories to be processed

After this we can create bit more condensed templates like:

    {% capture category_links %}{{ post.categories | category_links }}{{ page.categories | category_links }}{% endcapture %}