Check that configuration exists before trying to access it.

This fixes #99 by checking that a configuration exists before trying to access it.