code: public function exists(ResourceIdentifierInterface $identifier)
      {
          $record = $this->lookup($identifier);
  
          return is_object($record) ? true : $record;
      }
docs: Does the identity map know that ths supplied identifier exists?
  
  @param ResourceIdentifierInterface $identifier
  @return bool|null
  the answer, or null if the identity map does not know