Template throws exception for missing value