Fix crash in cache-control check