public static <T>T tryCast(Object object,Class<T> klass){
  if (klass.isInstance(object)) {
    return CoreUtil.<Object,T>downCast(object);
  }
 else {
    return null;
  }
}

public static < T > T tryCast ( Object object , Class < T > klass ) { if ( klass . isInstance ( object ) ) { return CoreUtil . < Object , T > downCast ( object ) ; } else { return null ; } }
if given object is an instance of given klass , return it cast to t , otherwise return null .
