Hello,
We recommend you to set values for all placeholders. You can set an empty blank space or a WordFragment with an empty paragraph when you don't want to set a value.
Or you can replace the placeholders and then use the removeTemplateVariable to remove the remaining ones. If you don't know the name of the remaining placeholders you can use the getTemplateVariables method.
Regards.