from typing import Optional
from typing import Tuple
from typing import Match
import re


def is_conversion_err(error: Exception) -> Optional[Tuple[str, int]]:
    """Check if error is caused by generic conversion error.

    Return a tuple of the converter type and parameter name if True,
    otherwise return None.
    """
    pattern: str = r'Converting to "(.+?)" failed for parameter "(.+?)"\.'
    match: Optional[Match] = re.search(pattern, str(error))
    if match:
        return (match.group(1), match.group(2))
    return None