Added checks for NULL returned from get_best_link_to_neighbor in the LQ code