diff --git a/core/modules/image/src/Entity/ImageStyle.php b/core/modules/image/src/Entity/ImageStyle.php
index dd26124..cf78431 100644
--- a/core/modules/image/src/Entity/ImageStyle.php
+++ b/core/modules/image/src/Entity/ImageStyle.php
@@ -173,7 +173,10 @@ public function buildUri($uri) {
       // source files not stored in the default scheme.
       if ($source_scheme != $default_scheme) {
         $class = $this->getStreamWrapperManager()->getClass($source_scheme);
-        $is_writable = $class::getType() & StreamWrapperInterface::WRITE;
+        $is_writable = FALSE;
+        if ($class) {
+          $is_writable = $class::getType() & StreamWrapperInterface::WRITE;
+        }
 
         // Compute the derivative URI scheme. Derivatives created from writable
         // source stream wrappers will inherit the scheme. Derivatives created
