Add null pointer check for component name

Bug: 339651741
Test: presubmit
Change-Id: I70fb8c3521cc21ab0f061aec90e0bf11dcf36550
1 file changed