Avoid calling expensive methods before checking if we need to

There’s no need to create the full $record structure before checking for handlers. This can be called inside a loop, and Datetime::createFromFormat() is very expensive.
So, is this going to be merged or not?

If it's relevant that a full record is used for checking, I can do that and just leave `datetime` out (until after the test)