To be honest i didnt know any better way and just copied from the old sting range check
Will replace with any method you recommend