p2: rename nil to undef