Sorry, this is wrong on my part. topics.langs contains objects, not string literals. So it's probably not possible to use indexOf.