It looks like there are no p tags found, so the call to getElementsByTagName returns an empty list, and then you try to call item(0) on an empty list, which is why you get the error.
You could split it over 2 lines to check for no elements:
$p = $html->getElementsByTagName("p");
if($p->length > 0) {
$desc = $p->item(0)->nodeValue;
} else {
$desc = "";
}