when template is not defined, it should not give undefined