Add support for anywhere rules

Can you make an overload of the registerCriticalWarning method that takes only the non-null arguments here?