Throw error if url is null