minor clean up, properly use NPE instead of IAE