Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.