Checking for the value of some template variables before using them.