I think this is wrong, isn't it, since `err` is null and was dealt with above.  You actually want this to be non-null.