stats: utility method to check whether a range is finite and non-zero