Check if a connection is valid before open a new tab