improve null deref test