Fix for null pointer exception that occurs if the data saved in the cookie is incomplete