Impossible to invoke a method ("isNotEmpty") on a null variable.
<div class="c-video">
<video id="js-home-video" data-bg="{{page.background.toFile.resize(1920, null, 90).url}}" class="js-home-video" loop autoplay muted playsinline>
<source src="{{page.video}}" type="video/mp4">
</video>
</div>
</div>
{% elseif page.background.toFile.isNotEmpty() %}
<div class="c-background">
<img class="w-full object-cover h-full" src="{{page.background.toFile.resize(1920, null, 90).url}}" width="1920">
</div>
{% endif %}
<div class="u-stretch u-page">