better checks for get-template-for