improved type check of expt and expt-int