null check for external url