Make infinity dependency optional for range type tests