document.cookie is a string containing a semicolon-separated list of cookies (i.e. key=value pairs)
first part of comparison forbids document.cookie to be null/false. In fact, this change doesn't change behavior in this case.