Check a sentence is valid palindrome or not