Fix debugging the app. Check last arguement is a link before trying to open it