Activity: Optimize IsSafeUrl.