fix: try ranges only if type_ is int
cleaner structure, pep7