Update DataCollector/TwigDataCollector.php

made `getTemplates()` more defensive