Checking for unique characters in a string