Twig\Error\RuntimeError

Line 7 of /home/casper/domains/casperfaassen.com/releases/6/site/snippets/content-blocks/_image.twig

Impossible to invoke a method ("resize") on a null variable.

{% extends "@snippets/content-blocks/_base-block.twig" %}

{% block content %}
    <div class="md:max-w-[70vw] xl:max-w-[1024px] mx-auto my-[80px]">
        {% if block.content.image.isNotEmpty() %}
            <figure class="my-0 mb-2">
                <img src="{{ block.content.image.toFile.resize(800,null,90).url }}" alt="{{ block.content.alt }}" class="w-full"/>
            </figure>
        {% endif %}
        {% if block.content.caption != '' %}
            <div class="max-w-[500px] mx-auto">{{ block.content.caption | nl2br }}</div>
        {% endif %}
    </div>