Add check to verify that rule is not null when searching rule from active rule