Couldn't you just go `name || undefined`?