handle nil referrer