Finished valid palindrome checker