this is where the string cast is done for templatereferences. instead of doing it in twig itself.