prevent getTopicsByTids crash if a topic is null