Avoid exception when trying to render page for an invalid topic id