I used a nullsafe method call:
return $order->getId()?->asString();
and got the error:
UnrecognizedExpression - src/Application/OrdersService.php:19:16 - Psalm does not understand PhpParser\Node\Expr\NullsafeMethodCalll (see https://psalm.dev/048)
This was because although I was using PHP 8 my project's composer.json defined a lower version. The root cause isn't really clear from the error, and the linked page says "This should never happen."
Possibly these cases could be handled with a more clear error message + linked explanation