Complete problem 6 - isPalindrome