diff --git a/vendor/magento/module-persistent/Observer/EmulateCustomerObserver.php b/vendor/magento/module-persistent/Observer/EmulateCustomerObserver.php
index 8429eabd19e..1ff81137de5 100644
--- a/vendor/magento/module-persistent/Observer/EmulateCustomerObserver.php
+++ b/vendor/magento/module-persistent/Observer/EmulateCustomerObserver.php
@@ -6,6 +6,7 @@
 namespace Magento\Persistent\Observer;
 
 use Magento\Framework\Event\ObserverInterface;
+use Magento\Framework\Exception\NoSuchEntityException;
 
 /**
  * Class EmulateCustomer
@@ -86,9 +87,9 @@ class EmulateCustomerObserver implements ObserverInterface
             /** @var  \Magento\Customer\Api\Data\CustomerInterface $customer */
             $customer = $this->customerRepository->getById($this->_persistentSession->getSession()->getCustomerId());
             if ($defaultShipping = $customer->getDefaultShipping()) {
-                /** @var  \Magento\Customer\Model\Data\Address $address */
-                $address = $this->addressRepository->getById($defaultShipping);
-                if ($address) {
+                $address = $this->getCustomerAddressById((int) $defaultShipping);
+
+                if ($address !== null) {
                     $this->_customerSession->setDefaultTaxShippingAddress(
                         [
                             'country_id' => $address->getCountryId(),
@@ -102,8 +103,9 @@ class EmulateCustomerObserver implements ObserverInterface
             }
 
             if ($defaultBilling = $customer->getDefaultBilling()) {
-                $address = $this->addressRepository->getById($defaultBilling);
-                if ($address) {
+                $address = $this->getCustomerAddressById((int) $defaultBilling);
+
+                if ($address !== null) {
                     $this->_customerSession->setDefaultTaxBillingAddress([
                         'country_id' => $address->getCountryId(),
                         'region_id' => $address->getRegion() ? $address->getRegionId() : null,
@@ -118,4 +120,19 @@ class EmulateCustomerObserver implements ObserverInterface
         }
         return $this;
     }
+
+    /**
+     * Returns customer address by id
+     *
+     * @param int $addressId
+     * @return \Magento\Customer\Api\Data\AddressInterface|null
+     */
+    private function getCustomerAddressById(int $addressId)
+    {
+        try {
+            return $this->addressRepository->getById($addressId);
+        } catch (NoSuchEntityException $exception) {
+            return null;
+        }
+    }
 }
