How to check if a link is safe