Using === (or !==) allows the compiler to disregard the other alternative type if the inferred type is e.g. a Union{Nothing, T}. Using == or isnothing does not allow this. https://github.com/JuliaLang/julia/pull/38905 might fix this though.
7 Likes