diff --git a/vendor/magento/module-rma/view/frontend/templates/return/create.phtml b/vendor/magento/module-rma/view/frontend/templates/return/create.phtml
index 4783b8dacca5..566b83d41c20 100644
--- a/vendor/magento/module-rma/view/frontend/templates/return/create.phtml
+++ b/vendor/magento/module-rma/view/frontend/templates/return/create.phtml
@@ -34,7 +34,7 @@
                         data-args='{"index":<%- data._index_ %>}'>
                     <?php foreach ($_items as $_item): ?>
                         <?php $totalAvlQty += $block->getAvailableQty($_item); ?>
-                        <?php if ($i == 0): ?>
+                        <?php if ($i == 0 && $_item->getProduct() !== null): ?>
                             <?php
                             $firstItemId = $_item->getId();
                             $productType = $_item->getProductType();
@@ -49,7 +49,7 @@
                         <?php if (!$_item->getParentItemId() || $_item->getParentItemId() != $bundleID): ?>
                             <?php $optionRel = $block->escapeHtmlAttr($_item->getProductType()) . '_'
                                 . $block->escapeHtmlAttr($block->getAvailableQty($_item)) . '_'
-                                . $block->escapeHtmlAttr($_item->getProduct()->getShipmentType());
+                                . $block->escapeHtmlAttr($shipmentType);
                             ?>
                             <option value="<?= (int) $_item->getId() ?>"
                                     id="item:order_item_id<%- data._index_ %>_<?= (int) $_item->getId() ?>"
