Avoid calling expensive methods before checking we need to

When calling addRecord() frequently (ie: in a loop with INFO records) without a handler, excessive calls to expensive methods (such as DateTime::createFromFormat) are made, only to then return false. So I moved the check to happen earlier.