Better checking over addObstacle