make sure the arguement to range is an integer