It is what was suggested and used in scripts for a long time to differentiate between PDFs with and without OCR.
That is hard to imagine. How (and why?) would someone stop the OCR after the title? Or remove everything from the text layer after it? At least in my case (see below), since the PDFs are machine-generated, they either have a complete text layer or none at all.
That depends on what you want to do, I think. For example, I process incoming PDFs with a smart rule, which consists basically only of a script. Simply because smart rules can’t handle conditions.
In a script, I can write (symbolically)
if record has no text layer
do OCR
end if
and then I handle the new (ie textlayer-ed) record just as any other that already has a text layer: get the text, scan it for different regular expressions, generate standardized names depending on these Res and move the records to the appropriate subgroups (again, depending on the content of the records). In one script, which is run by one smart rule. Doing that without a script, only with a smart rule, is not possible with a single rule. AFAIK.
There are lots of things one can do with smart rules, and I’m always surprised when @BLUEFROG pulls another trick out of his hat. But there are also things that can’t be done with them. Conditional processing is one of them.