nicklockwood/NullSafe
NullSafe is a simple category on NSNull that returns nil for unrecognised messages instead of throwing an exception observed · 2026-08-28
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 5005
- days_rel: n/a
- days_push: 1115
- n_releases_24m: 0
Adoption not part of the score
1938 stars · 356 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
NullSafe is a small Objective-C category on NSNull that returns nil for unrecognized messages instead of throwing an exception. It prevents common crashes caused by unexpected null values in JSON or plist data.
Use cases
- prevent crashes from null values in JSON responses
- make NSNull tolerate unrecognized method calls
- handle nulls in plist parsing safely
- avoid exceptions when network data contains null instead of arrays or strings
When to choose
- you maintain a legacy Objective-C iOS or macOS app that crashes on unexpected JSON nulls
- you want a drop-in single-file fix with no header includes
- you need ARC and non-ARC compatibility
When to avoid
- you are writing new code in Swift where optionals already handle nulls
- you prefer explicit null handling over runtime message interception
- your project targets modern platforms where NSNull misuse is rare
Facets
library · maturity maintenance
error-handling serialization developer-tools mobile-development objective-c nsnull crash-prevention ios macos
1 source
- readme: https://github.com/nicklockwood/NullSafe · fetched 2026-08-28 · c7f5a8483f33
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| nicklockwood/NullSafe | main | 32 |
For agents
markdown · JSON · MCP: product_card(name="nicklockwood/NullSafe")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem