Use isAssignableFrom. otherwise class extending ImageResource or DataResource cannot be used. See https://gwt-review.googlesource.com/#/c/6350/5