Maybe add:
`if (!url) { return; }`