Guard against undefined defaultUrl