More small npe-like fixes