lib: be smarter about SLAM null check, as the individual magic checks can also set N to null.