Actually check that a security group exists before trying to use its name as a key in inventory.