istype() checks type not strictly. If you check a subclass with parent type, it will check out.

/obj/item/stack/medical/bruise_pack/tajaran
is subtype fo 
/obj/item/stack/medical/bruise_pack

so 
istype(tool, /obj/item/stack/medical/bruise_pack)
would work for both of them.