last should be undefined if undefined, JavaScript doesn't use nulls the same way other languages do.