Add pre-check function for range matcher

This adds a pre-check function for the range matcher, fixing a KeyError
when one attempts to use the range matcher without the required module
being installed.
Merge pull request #9279 from terminalmage/issue9236

Add pre-check function for range matcher