Add missing check for undefined
Add missing check for undefined

Change-Id: I639786395bc830cfb07a6d8dbc2b08ddb8f1d92c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2230506
Reviewed-by: Alex Rudenko <d8d88e7d7e77f69e23d1d1432231196fb8e02a62@chromium.org>
Commit-Queue: Sigurd Schneider <f04d242e109628a27a0f75fd49a87722bcf291fd@chromium.org>

ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend