Update template.class.php

Making sure template construtor accepts null