Checking for null values
You can include a condition to check that an entity is null, or not null, in your rules.
Use the if <entity> is null then... construct to test whether an entity is null. For example, the following rule checks if the relationship to the customer entity does not exist:
when a purchase event occurs , called 'the purchase'
if
the customer of 'the purchase' is null
then
print "There is no customer!";