Added instanceof check
0.2.2