This came up on slack in the #data channel: it would be nice to have a function to check if something is Nothing, since (apparently) x == nothing has a performance hit, and it's easy to forget to use x === nothing. Related: #28700
More importantly from my perspective, it has a nice symmetry with ismissing() and isnan(). I'm always expecting this to be a thing.
I did some searching in the repo and in discourse, where I found this comment
To simplify checking for nothingness, I wonder whether it’d be helpful to have
isnothing(analogous toismissing), but it’s also true thatx isa Nothingisn’t much longer.
The only thing in the repo when I search for "isnothing" is a comment in #414 that uses it in some code (not sure if that was an assumption or if it used to be a thing and isn't anymore).
Working on a simple PR that would add this if there's interest. Basically just
isnothing(x::Any) = x === nothing ? true : false
(plus docs and tests of course 😆)
Resolved by #29679
Most helpful comment
Resolved by #29679