Add validation for topics array