Fix error on empty template

One of my template files was completely empty, which caused str_trim to return `logical(0)`, which caused an error when used in a conditional.