Check config argument before using it.

Fixes #162