Guard against undefined URL when setting Ajax customdata