hook_entity_field_access - trying to check if there's a value
In the documentation for EntityAccessControlHandler::fieldAccess(), the method that invokes the hook you are implementing, $items is defined as follows.


  \Drupal\Core\Field\FieldItemListInterface $items: (optional) The field values for which to check access, or NULL if access is checked for the field definition, without any specific value available. Defaults to NULL.


This could also happen if the entity containing the field is being created, and not modified. That is the reason why Drupal core implementations of that hook always check the value of $items before using it.

  // language_entity_field_access()
  // Only allow edit access on a langcode field if the entity it is attached to
  // is configured to have an alterable language. Also without items we can not
  // decide whether or not to allow access.
  if ($items &amp;&amp; $operation == 'edit') {
    // Omissis.
  }




  // views_entity_test_entity_field_access()
  if ($field_definition-&gt;getName() == 'test_text_access') {
    if ($items) {
      if ($items-&gt;value == 'no access value') {
        return AccessResult::forbidden()-&gt;addCacheableDependency($items-&gt;getEntity());
      }
    }
  }