The fix is straightforward: only try to read the type if the comment body is not null. if the comment body is null, we aren't going to need its type anyway.