is and as

今天看communicaty 的代码的时候发现了下面这段代码。似乎有点味道。
public T GetDataItem<T>() where T : class
        {
            if (this.Weblog is T)
                return this.Weblog as T;
            else
                return null;
        }
难道有什么深意,如下这么些似乎更好一些。
public T GetDataItem<T>() where T : class
        {
            return this.Weblog as T;
        }
原文地址:https://www.cnblogs.com/sky266/p/1013096.html