Does this really expect ``$object`` to be a string ?

And the resolution of ``null`` at compile time looks wrong to me. the argument may use a variable being null or not null.