1) added an assertion
2) added a getter for the taint wrapper
3) generalized some instanceof checks