Checks if relationship index exists before creating.