code: function isTypeInstanceOf(source, target) {
              return source === target || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);
          }
docs: A type S is considered to be an instance of a type T if S and T are the same type or if S is a subtype of T but not structurally identical to T. This specifically means that two distinct but structurally identical types (such as two classes) are not considered instances of each other.