Updated topic to trow error if no valid words are put as a topic