check that testconfig is a hash before using it