Handle categories.posts.index == null

If `categories.posts.index` is `null`, it's rendered as `NaN` causing 404 response.
Merge pull request #22 from char101/patch-1

Handle categories.posts.index == null