Check if we have the value before trying to use it.
Merge pull request #139 from adam-vessey/7.x-safer-range

Check if we have the value before trying to use it.