handle nil url