def sanitize_int(value):
    """
    Sanitize an input value to an integer.

    :param value: Input value to be sanitized to an integer
    :return: Integer, or None of the value cannot be sanitized
    :rtype: int or None
    """
    if isinstance(value, str):
        try:
            return int(value)
        except ValueError:
            return None
    elif isinstance(value, int):
        return value