refactoring: remove redundant null check

If the cache parameter is null, both callers will crash right before or
right after the call to storeCachePreviewMap. There is no point in
checking for nullness in this method.