France - that might cause an issue as they obliviously can have zero settlements. It can however be circumvented by creating a hidden faction leader trait for the faction leader (BecomesFactionLeader event and as descr_strat character trait) and then check if that trait exists, it does however require an additional monitor:
Code:
    ; --- dead horde faction (france) 
monitor_event FactionTurnEnd FactionType france
    and FactionLeaderTrait HordeLeader < 1
    ;20. Milan
    if I_LocalFaction milan
        if I_NumberOfSettlements france < 1
            console_command diplomatic_stance milan france Neutral
        end_if
    end_if
end_monitor
To test if any monitor works I would suggest to add a valid historic_event line underneath the console command.