Optimizing isWordGuessed