activities($case)[0] ?? null; return $activity === null ? null : StepState::fromActivity($activity->state); } }