add instanceof method to shared pointer