use comparison against `null` instead of `is_null` : `if (null !== $keyMetadata = $this->source->getMetadata($id, $domain)) {`