# Realtime DB Null values not working

**URL:** <https://community.thunkable.com/t/realtime-db-null-values-not-working/582837>\
**Category:** Questions about Thunkable X\
**Tags:** advanced, realtimedb\
**Created:** [May 21, 2020, 4:50pm UTC](https://community.thunkable.com/t/realtime-db-null-values-not-working/582837 "2020-05-21T16:50:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan\_hall\_apps](https://avatars.discourse-cdn.com/v4/letter/r/f6c823/32.png) [@ryan\_hall\_apps](https://community.thunkable.com/u/ryan_hall_apps)\
**Post date:** [May 21, 2020, 4:50pm UTC](https://community.thunkable.com/t/realtime-db-null-values-not-working/582837/1 "2020-05-21T16:50:48Z")

</div>

A few days ago I could get a null value (or value that doesn’t exist) from my RealtimeDB database.

Now when the program tries to retrieve that variable (that doesn’t exist) it makes the entire screen white. I get “undefined” on the error message. Which typically means everything is ok.

I know it is a null value, but it was working before. This is a key part of my app to see if the user has entered data, and I don’t believe there is a way around it.

Is this a bug that recently changed?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [May 22, 2020, 8:06am UTC](https://community.thunkable.com/t/realtime-db-null-values-not-working/582837/2 "2020-05-22T08:06:21Z")

</div>

Yes, the platform is constantly evolving and for this reason, there may be situations when something does not work. But this does not mean that the problem is only in the platform. Before using the data, you should check that it exists. So make checks for null, undefined, and the like.

---

<div class="post-metadata">

**Author:** ![zbk0612eip8w](https://avatars.discourse-cdn.com/v4/letter/z/7ab992/32.png) [@zbk0612eip8w](https://community.thunkable.com/u/zbk0612eip8w)\
**Post date:** [May 26, 2020, 7:54am UTC](https://community.thunkable.com/t/realtime-db-null-values-not-working/582837/3 "2020-05-26T07:54:25Z")

</div>

I am experiencing the same issue again with my cloud variables again like my other post. Realtime db doesn’t work too

---

<div class="post-metadata">

**Author:** ![ryan\_hall\_apps](https://avatars.discourse-cdn.com/v4/letter/r/f6c823/32.png) [@ryan\_hall\_apps](https://community.thunkable.com/u/ryan_hall_apps)\
**Post date:** [May 26, 2020, 3:06pm UTC](https://community.thunkable.com/t/realtime-db-null-values-not-working/582837/4 "2020-05-26T15:06:11Z")

</div>

@zbk0612eip8w,

This is very frustrating. Originally, in my app I checked for a null value in my realtimedb and if it came back null then I asked for info from the user.

This doesn’t work anymore. I did a workaround and stored a local variable that let the code know “hey this user hasn’t sent this info yet”.

Again, super annoying. Hope this helps.

---

<div class="post-metadata">

**Author:** ![zbk0612eip8w](https://avatars.discourse-cdn.com/v4/letter/z/7ab992/32.png) [@zbk0612eip8w](https://community.thunkable.com/u/zbk0612eip8w)\
**Post date:** [June 12, 2020, 6:32am UTC](https://community.thunkable.com/t/realtime-db-null-values-not-working/582837/5 "2020-06-12T06:32:44Z")

</div>

@ryan_hall_apps, i tried to add a label that shows the error when i did it. The error somehow suprised me:

J.a.get(…).database is not a function

I see a lot of posts about the same thing, it started happening again.

---

<div class="post-metadata">

**Author:** ![ryan\_hall\_apps](https://avatars.discourse-cdn.com/v4/letter/r/f6c823/32.png) [@ryan\_hall\_apps](https://community.thunkable.com/u/ryan_hall_apps)\
**Post date:** [June 16, 2020, 7:23pm UTC](https://community.thunkable.com/t/realtime-db-null-values-not-working/582837/7 "2020-06-16T19:23:32Z")

</div>

@zbk0612eip8w, I have noticed that saving a Null item as a stored variable is better than saving the variable as a local app variable.

 ![Capture](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/0/206096e8f6935673d027903ea831f1b140662e9b.jpeg)

You can see in the screen shot I call a get function to realtimeDB and store that item in a stored variable. If the stored variable is null the function still runs properly. I also don’t get any funny errors with this.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:25am UTC](https://community.thunkable.com/t/realtime-db-null-values-not-working/582837/8 "2024-11-08T11:25:42Z")

</div>


