Added isPalindrome predicate