added a function to check link, refs #398