Null Value
Why null values matter
Null is not the same as zero or blank. Zero is a number, an empty text is still a text, but null means the value is simply absent. A user who hasn't added a phone number, an order with no delivery date yet, or a profile with no photo all leave null values behind.
The trouble comes when an app assumes data is always there. Code that tries to display or calculate with a value that turns out to be null is one of the most common causes of crashes and broken screens. Handling nulls on purpose is what keeps an app stable when data is incomplete.
How null values work
When a record is created without a value for some field, the database can store null there instead of forcing a fake value. Later, when the app reads that record, it has to check whether the field is null before using it.
Well-built apps expect nulls. They show a sensible fallback, like "not provided," skip calculations that don't apply, or prompt the user to fill the gap. On Emergent, you can prompt the agent to keep a consistent schema and handle missing fields, so nulls are caught rather than crashing a screen.
Null value examples
A user signs up for a fitness app but skips the optional "height" field. The database stores that height as null. Later, a screen tries to calculate their target stats using height and, because the value is null instead of a number, the calculation fails and the screen goes blank. The fix is to check for null first and show a "add your height to see targets" message instead of running the math.
Frequently Asked Questions
Your Questions, Answered
Don't change this element unless you know what you are doing
on Emergent today


