Assigned page no longer exists

I have a problem:
I have a page on which subpages from another page are also displayed or pages can be assigned in the backend. However, if an assigned subpage no longer exists, I get the following error:

Call to a member function url() on null

The associated code is:

<?php foreach($page->produktionen()->split() as $item) : ?>
				<?php $item = str_replace("_","-",$item) ?>
				<a class="col-lg-4 col-xs-12 card cardFull" href="<?= page($item)->url() ?>">
					<div class="card_image">
						<?php if ($image = page($item)->cover()->toFile()) : ?>
							<img alt="" src="<?= $image->url() ?>" alt=""/> 
						<?php endif ?>
					<div class="card_overlay"></div>
					<div class="card_heading">
						<span class="small"><?php e($kirby->language() == "de", 'Produktionen', 'Productions') ?></span>
						<h3><?= page($item)->title() ?></h3>
			<?php endforeach ?>

check if the page exists before calling its url method.

In the code above you already do similar things for the $image.

Oh man, so simple. Sometimes you can’t see the wood for the trees. Thank you