Add null check for favicon loading.