Fixes bug where we try to iterate over null object if no topics defined.