Fixed test that was handling NPE weirdly