How to handle null values in Freemarker? I get some exceptions in the template when null values are present in data.
null
If you have a lot of variables to convert in optional, you can use SubimeText with this:
Find: \${([A-Za-z_0-9]*)} Replace: \$\{${1}!\}
Be sure regex and case-sensitive options are enabled: