diff --git a/src/Entity/ExternalEntity.php b/src/Entity/ExternalEntity.php
index 78c64fe6152dc3d1bf31564016f8970b7fd28c55..aba5189ccb398a86074401ddd7d63b45840d1381 100755
--- a/src/Entity/ExternalEntity.php
+++ b/src/Entity/ExternalEntity.php
@@ -198,7 +198,7 @@ class ExternalEntity extends ContentEntityBase implements ExternalEntityInterfac
   /**
    * {@inheritdoc}
    */
-  public function mapAnnotationFields(ContentEntityInterface $annotation = NULL) {
+  public function mapAnnotationFields(?ContentEntityInterface $annotation = NULL) {
     $external_entity_type = $this->getExternalEntityType();
     if ($external_entity_type->isAnnotatable()) {
       if (!$annotation) {
diff --git a/src/ExternalEntityAccessControlHandler.php b/src/ExternalEntityAccessControlHandler.php
index 27620a678b98169e3de5154bbcb77e7e07e59dfc..18b747e2052da94fcab64427dbfb336a4a616f5b 100755
--- a/src/ExternalEntityAccessControlHandler.php
+++ b/src/ExternalEntityAccessControlHandler.php
@@ -86,7 +86,7 @@ class ExternalEntityAccessControlHandler extends EntityAccessControlHandler impl
   /**
    * {@inheritdoc}
    */
-  protected function checkFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, FieldItemListInterface $items = NULL) {
+  protected function checkFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) {
     $result = parent::checkFieldAccess($operation, $field_definition, $account, $items);
 
     // Do not display form fields when the external entity type is read-only,
diff --git a/src/ExternalEntityInterface.php b/src/ExternalEntityInterface.php
index 849ea11cc2dc389b55c9eb08ae1cd89f078ecf71..e00a0e71c4df11298dfee1d2564a00ebd6d2c8f0 100755
--- a/src/ExternalEntityInterface.php
+++ b/src/ExternalEntityInterface.php
@@ -52,6 +52,6 @@ interface ExternalEntityInterface extends ContentEntityInterface {
    *
    * @return $this
    */
-  public function mapAnnotationFields(ContentEntityInterface $annotation = NULL);
+  public function mapAnnotationFields(?ContentEntityInterface $annotation = NULL);
 
 }
diff --git a/src/ExternalEntityStorage.php b/src/ExternalEntityStorage.php
index 589d382f8059f7fc8f552fd855a87058bfaaf16b..50076322fbedfd445a6eec738bc6eb7eb6b1d772 100755
--- a/src/ExternalEntityStorage.php
+++ b/src/ExternalEntityStorage.php
@@ -220,7 +220,7 @@ class ExternalEntityStorage extends ContentEntityStorageBase implements External
   /**
    * {@inheritdoc}
    */
-  protected function doLoadMultiple(array $ids = NULL) {
+  protected function doLoadMultiple(?array $ids = NULL) {
     // Attempt to load entities from the persistent cache. This will remove IDs
     // that were loaded from $ids.
     $entities_from_cache = $this->getFromPersistentCache($ids);
@@ -254,7 +254,7 @@ class ExternalEntityStorage extends ContentEntityStorageBase implements External
    * @return \Drupal\Core\Entity\ContentEntityInterface[]
    *   Array of entities from the storage.
    */
-  protected function getFromExternalStorage(array $ids = NULL) {
+  protected function getFromExternalStorage(?array $ids = NULL) {
     $entities = [];
 
     if (!empty($ids)) {
diff --git a/src/Plugin/ExternalEntities/StorageClient/Rest.php b/src/Plugin/ExternalEntities/StorageClient/Rest.php
index 27e8b0db16f45b45141b67806e50bf7742e4646b..96ae0db3b891510a6686427d907b8ad3002909a2 100755
--- a/src/Plugin/ExternalEntities/StorageClient/Rest.php
+++ b/src/Plugin/ExternalEntities/StorageClient/Rest.php
@@ -276,7 +276,7 @@ class Rest extends ExternalEntityStorageClientBase implements PluginFormInterfac
   /**
    * {@inheritdoc}
    */
-  public function loadMultiple(array $ids = NULL) {
+  public function loadMultiple(?array $ids = NULL) {
     $data = [];
 
     if (!empty($ids) && is_array($ids)) {
diff --git a/src/RouteProcessor/RouteProcessorExternalEntityType.php b/src/RouteProcessor/RouteProcessorExternalEntityType.php
index 010e87013b1022ffa26a2e6937926dad55749ebd..b3ef8219413bc0cc90359b56cb014db82dc9fbb1 100755
--- a/src/RouteProcessor/RouteProcessorExternalEntityType.php
+++ b/src/RouteProcessor/RouteProcessorExternalEntityType.php
@@ -40,7 +40,7 @@ class RouteProcessorExternalEntityType implements OutboundRouteProcessorInterfac
   /**
    * {@inheritdoc}
    */
-  public function processOutbound($route_name, Route $route, array &$parameters, BubbleableMetadata $bubbleable_metadata = NULL) {
+  public function processOutbound($route_name, Route $route, array &$parameters, ?BubbleableMetadata $bubbleable_metadata = NULL) {
     if (empty($parameters['external_entity_type']) && !empty($parameters['bundle'])) {
       $external_entity_type = $this->entityTypeManager->getDefinition($parameters['bundle'], FALSE);
       if ($external_entity_type && $external_entity_type->getProvider() === 'external_entities') {
diff --git a/src/StorageClient/ExternalEntityStorageClientInterface.php b/src/StorageClient/ExternalEntityStorageClientInterface.php
index a2cc191e56984578b81d0b24409de67c37b0da30..239bfd5bd1d9790f9f8b53ac28fec4f026ac64d8 100755
--- a/src/StorageClient/ExternalEntityStorageClientInterface.php
+++ b/src/StorageClient/ExternalEntityStorageClientInterface.php
@@ -37,7 +37,7 @@ interface ExternalEntityStorageClientInterface extends PluginInspectionInterface
    * @return array
    *   An array of raw data arrays indexed by their IDs.
    */
-  public function loadMultiple(array $ids = NULL);
+  public function loadMultiple(?array $ids = NULL);
 
   /**
    * Saves the entity permanently.