check type in Smarty plugin