Extra brackets

Need to have brackets around equality checks to prevent the index of the array `string` to be out of range.
Merge pull request #434 from RinkeHoekstra/patch-2

Extra brackets