Cleanup r70571, more strict checks for getCookie() return values