freemarker.core.InvalidReferenceException: The following has evaluated to null or missing: ==> wordscounter [in template "" at line 39, column 40] ---- Tip: If the failing expression is known to be legally refer to something that's null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing . (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${fixTitle(wordscounter?number, getEl... [in template "" at line 39, column 29] ----