diff --git a/core/modules/page_cache/src/StackMiddleware/PageCache.php b/core/modules/page_cache/src/StackMiddleware/PageCache.php
index a4d9053..52d642b 100644
--- a/core/modules/page_cache/src/StackMiddleware/PageCache.php
+++ b/core/modules/page_cache/src/StackMiddleware/PageCache.php
@@ -264,7 +264,10 @@ protected function fetch(Request $request, $type = self::MASTER_REQUEST, $catch
       }
     }
     else {
-      $date = $response->getExpires()->getTimestamp();
+      // The getExpires method could return NULL if Expires header is not set, so
+      // the returned value needs to be checked before calling getTimestamp.
+      $expires = $response->getExpires();
+      $date = ($expires == NULL) ? 0 : $expires->getTimestamp();
       $expire = ($date > $request_time) ? $date : Cache::PERMANENT;
     }
 
