fix #496 bug with empty template variables in tbg

add support for empty variables
Merge pull request #529 from psychocoderHPC/fix-tbgBugEmptyVariable

fix #496 bug with empty template variables in tbg