def validate_positive_integer_or_none(option, value):
    """Validate that 'value' is a positive integer or None.
    """
    if value is None:
        return value
    return validate_positive_integer(option, value)
Validate that 'value' is a positive integer or None.
    
stackoverflow/venv/lib/python3.6/site-packages/pymongo/common.py