Add null check in duplicate widgets check

1 job for 5381-fix_startup_crash in 4 minutes and 10 seconds (queued for 1 second)