[fix]null object cath exception twig extension