# Handle NULL values with data scraping

**URL:** <https://forum.uipath.com/t/handle-null-values-with-data-scraping/35697>\
**Category:** Help\
**Tags:** data-scraping, uiautomation, activities\
**Created:** [June 7, 2018, 6:55pm UTC](https://forum.uipath.com/t/handle-null-values-with-data-scraping/35697 "2018-06-07T18:55:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gitiyboy](https://avatars.discourse-cdn.com/v4/letter/g/e9a140/32.png) [@Gitiyboy](https://forum.uipath.com/u/Gitiyboy)\
**Post date:** [June 7, 2018, 6:55pm UTC](https://forum.uipath.com/t/handle-null-values-with-data-scraping/35697/1 "2018-06-07T18:55:14Z")

</div>

I have built a simple workflow to extract data from a website. Using the Data Scraping tool I have identified elements to be extracted. Some elements are however not always present. So by running below workflow I get an error: “object reference not set to an instance of an object”. I assume it has to do with the missing element in some cases. Is there a way to handle null values in case elements are not present?

---

<div class="post-metadata">

**Author:** ![rajeshprabhu\_gp](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rajeshprabhu_gp/32/21132_2.png) [@rajeshprabhu\_gp](https://forum.uipath.com/u/rajeshprabhu_gp)\
**Post date:** [June 8, 2018, 1:15pm UTC](https://forum.uipath.com/t/handle-null-values-with-data-scraping/35697/2 "2018-06-08T13:15:23Z")

</div>

@Gitiyboy, please Check element Exist or image exist first before doing the extract,

other wise you could check on the Data table row count is 0.

let me know if that helps,

Thanks~Rajesh

---

<div class="post-metadata">

**Author:** ![Gitiyboy](https://avatars.discourse-cdn.com/v4/letter/g/e9a140/32.png) [@Gitiyboy](https://forum.uipath.com/u/Gitiyboy)\
**Post date:** [June 18, 2018, 6:17pm UTC](https://forum.uipath.com/t/handle-null-values-with-data-scraping/35697/3 "2018-06-18T18:17:53Z")

</div>

@rajeshprabhu_gp

sorry for the late reply. I am new to UIPath so i am not sure what you mean. See below for my workflow. Sometimes an element does not exist. In that case I want to get NULL for that element, but now i get an error.

Could you please help?

 ![image](https://global.discourse-cdn.com/uipath/original/3X/4/2/42a8baeb7186eca6a00d5e1f6c6d863e3f9aa8d9.png)

---

<div class="post-metadata">

**Author:** ![rajeshprabhu\_gp](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rajeshprabhu_gp/32/21132_2.png) [@rajeshprabhu\_gp](https://forum.uipath.com/u/rajeshprabhu_gp)\
**Post date:** [June 18, 2018, 8:32pm UTC](https://forum.uipath.com/t/handle-null-values-with-data-scraping/35697/4 "2018-06-18T20:32:27Z")

</div>

@Gitiyboy

have If activity to check Datatable (Eindhoven) row count is \> 0 then write csv else its null.

some thing like below in IF Criteria  
Eindhoven.rows.count \> 0

Thanks~Rajesh

---

<div class="post-metadata">

**Author:** ![arivu96](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@arivu96](https://forum.uipath.com/u/arivu96)\
**Post date:** [June 19, 2018, 2:14am UTC](https://forum.uipath.com/t/handle-null-values-with-data-scraping/35697/5 "2018-06-19T02:14:16Z")

</div>

Hi @Gitiyboy,

Use if condition to check the datatable is null or not  
`IsNothing(Eindhoven)`

True -.\> DataTable is null

Regards, Arivu 🙂

---

<div class="post-metadata">

**Author:** ![Gitiyboy](https://avatars.discourse-cdn.com/v4/letter/g/e9a140/32.png) [@Gitiyboy](https://forum.uipath.com/u/Gitiyboy)\
**Post date:** [June 19, 2018, 7:40am UTC](https://forum.uipath.com/t/handle-null-values-with-data-scraping/35697/6 "2018-06-19T07:40:26Z")

</div>

@rajeshprabhu_gp @arivu96

do you mean like picture? What do I put in box if True?

 ![image](https://global.discourse-cdn.com/uipath/original/3X/a/3/a319f75603db4d0198b066676bbe1f4bbccc1350.png)
