Avoid calling pushState with an empty url.