Various pitfalls for NPE avoided