chore: fix unexpected null when device is not known
Description
Fixes https://famedly-ip.sentry.io/issues/4277512090/?project=1448986
Checklist
-
I read the [Contributor Guide] and followed the process outlined there for submitting PRs. -
I updated/added relevant documentation (doc comments with ///). -
I did not add or update methods, functions or widgets without tests.