Use `in` operator instead of testing undefined.

Closes #30.