generalize the type check in doexpect
Merge pull request #10 from dchelimsky/generalize-list

generalize the type check in doexpect