quote undefs as `undef()` and document in more detail