When checking for drange, check if non-None instead of checking for the existance of the key.