ERROR in RuleEngine - Rule XXX: null

I still have this error from time to time and according to my opinion, it has nothing to do with the rule code itself.

Even if you check everything with an if statement the error still occurs.

Sometimes (not reproduceable, it’s some kind of a race condition) openHAB is unable to run the rule.