Previously, the nil value would be compared to any RegExps, which causes method_missing to be invoked on nil, which is both slow and always guaranteed to fail matching against the RegExp.
Handle nil tags specially to avoid slow method_missing calls.
Did I get the method intent correct? It was a little hard to figure out what that block was doing. I think it's registering an empty object for the tag, so I came up with "register_empty".
Yes, that's exactly what it's doing. It makes sense.