added type check to snd2wav