bug fix of isSubTypeExisted