Index: CachingStatement.cs
===================================================================
--- CachingStatement.cs	(revision 563920)
+++ CachingStatement.cs	(working copy)
@@ -410,7 +410,8 @@
             CacheKey cacheKey = this.GetCacheKey(request);
             cacheKey.Update("ExecuteQueryForObject");
 
-            obj = (T)this.Statement.CacheModel[cacheKey];
+            if (this.Statement.CacheModel[cacheKey] is T)
+                obj = (T) this.Statement.CacheModel[cacheKey];
             // check if this query has alreay been run 
             if ((object)obj == CacheModel.NULL_OBJECT)
             {
