LPS-52246 Check that ddmTemplateElement is not null