Added extra check in the RedirectUrl helper for easier bug detection