'fixing NPE throw'