$hasContent = empty($this->item->module) || isset($this->item->xml->customContent);
line 23 in /administrator/components/com_modules/tmpl/module/edit.php
Sets a value to $hascontent if either of the conditions on the right side is true. The conditions appear to be is the module empty or is customContent set, i.e. not null.
If you want to find out what the value is that is set then use the following to display it.