Protect against null return value in getCookies().