improving isAssignable method to deal with classes loaded in different classloaders