Hook for a topic's category id?

That’s how I’m doing it here: