Prevent NPE when trying to access cookies