isMedia check and only router.navigate if data-navigate exists