diff --git a/core/modules/image/src/Entity/ImageStyle.php b/core/modules/image/src/Entity/ImageStyle.php
index e72258d..1ae23d4 100644
--- a/core/modules/image/src/Entity/ImageStyle.php
+++ b/core/modules/image/src/Entity/ImageStyle.php
@@ -171,7 +171,9 @@ 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;
+        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
