def safeintdiv(x, y):
    'Safe integer division that handles None gracefully'
    if (x is None):
        return None
    return int((x / y))
Safe integer division that handles None gracefully
def safeintdiv(x, y):
    
    if (x is None):
        return None
    return int((x / y))