added twig display filter to correctly display variables based on type