Twig\Error\RuntimeError

Line 6 of /home/baywatec/public_html/baywa-technik.at/site/templates/blocks/block_contact_person.html.twig

Impossible to access an attribute ("picture") on a null variable.

{% set nr_contact_persons = block.contact_person.value | length %}

{% if nr_contact_persons == 1 and block.use_slider == 'false' %}
    {% set contact_person_page = block.contact_person %}
    {% set contact_person = contact_person_page.toPage() %}
    {% set image = contact_person.image(contact_person.picture.yaml()[0]) %}

    <div class="block-contact-person__wrapper">
        <div class="u-generic-wrapper">
            <div class="u-generic-wrapper-margin">

                {% if block.title.isNotEmpty %}