check if distance is really given