fix potential NPE in TopicRouter