Remove instances of undefined and only test truthiness in compact()

#### Resolves #11

- removes all instances of `undefined` (not a thing)
- only tests truthiness in `compact()`