Avoiding strange NPE