Improved the null check

I was checking for the primary cache being null in the wrong way. Now fixed.

Signed-off-by: Aaron Rosenzweig <aaron@chatnbike.com>