Preventing datetime comparison with NoneType in case of expires_on does not exists in _validate_cached_data.