Change templateExist to static function