Failover url to empty string

Fixes NPE when pushState is enabled and undefined is passed as the url.
Save off collection reference
Simplify conditional