check if a giver string is palindrome