type resolving for annotation values in templates.