[Elements]: Fix setAsInspectedNode failure for unbound pseudoType nodes
[Elements]: Fix setAsInspectedNode failure for unbound pseudoType nodes

Issue:
- pseudoType nodes are vulnerable to causing a failure since it references its parent on setAsInspectedNode which causes a failure if the pseudoType node is unbound

Changes:
- Adding a check in _selectedNodeChanged for the case of an unbound pseudo node and to treat it as the null case

Bug: 1104027
Change-Id: I90ff8d58751f1fb093d16e2fc174488dc416a2fe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2290469
Commit-Queue: Michael Liao <00d75d81082fdf74688ec453c516b42f7cbf0f40@microsoft.com>
Reviewed-by: Songtao Xia <efb39a3e57dd0e7c4fd137171d5e7a3f041d1da6@microsoft.com>

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