 extension TextStorage: VideoAttachmentDelegate {
 
     func videoAttachmentPlaceholderImageFor(attachment: VideoAttachment) -> UIImage {
-        assert(attachmentsDelegate != nil)
-        return attachmentsDelegate.storage(self, placeholderFor: attachment)
+        guard let delegate = attachmentsDelegate else {
+            fatalError()
+        }
+
+        return delegate.storage(self, placeholderFor: attachment)
     }
 
     func videoAttachment(

        onSuccess success: @escaping (UIImage) -> (),
        onFailure failure: @escaping () -> ())
    {
        assert(attachmentsDelegate != nil)
        attachmentsDelegate.storage(self, attachment: videoAttachment, imageFor: url, onSuccess: success, onFailure: failure)
    }
}


        onSuccess success: @escaping (UIImage) -> (),
        onFailure failure: @escaping () -> ())
    {
        guard let delegate = attachmentsDelegate else {
            fatalError()
        }

        delegate.storage(self, attachment: mediaAttachment, imageFor: url, onSuccess: success, onFailure: failure)
    }
}

