CLN: Clean up the _cached_range exceptions and checks

(Plus catch the uncaught obj + None TypeError that was going on in the
test cases)