check whether a string's a palindrome in swift