safeCast<R> method

R? safeCast<R>()

Implementation

R? safeCast<R>() {
  if (this is R) return this as R;
  return null;
}