IsNull in LibreOffice Basic, unlike VBA, returns True when an object variable is passed that doesn't refer to a valid object (e.g., just created not yet assigned object, or assigned to Nothing literal). This is a conscious design decision (see tdf#146112), and is widely used [1]. This should be mentioned in the help. (And when bug 146112 is fixed, the VBA mode difference also needs to be reflected in help.) [1] https://ask.libreoffice.org/t/is-there-are-value-for-a-null-object-in-lobasic/31483/2
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/9f789ddb74b0928a3bfa58284b69320518d59007 tdf#146113 Precisions on IsNull Basic function.