Handle the exception when the word being searched is not found