making sure cache can't be null