Prevent Exception from accessing $xml->Items->TotalPages.