def is_palindrome(s):
    """
    Determine whether or not given string is valid palindrome

    :param s: given string
    :type s: str
    :return: whether or not given string is valid palindrome
    :rtype: bool
    """
    # basic case
    if s == '':
        return True

    # two pointers
    # one from left, one from right
    i = 0
    j = len(s) - 1
    while i < j:
        # find left alphanumeric character
        if not s[i].isalnum():
            i += 1
            continue
        # find right alphanumeric character
        elif not s[j].isalnum():
            j -= 1
            continue
        # case insensitive compare
        if s[i].lower() != s[j].lower():
            return False
        i += 1
        j -= 1

    return True