+ The “OnDocFormPrerender” and “OnDocFormRender” events now have the document template ID parameter.

...ument template ID parameter.
Isset is enough, empty(0) == true.