Checks if words are valid for a given language dictionary