Fix handling of non-string keys in filter_hidden_settings

The ``filter_hidden_settings`` function raises a ``ValueError`` when the configuration object is a mapping with non-string keys because it tests the value rather than the key in the ``isinstance`` check. This fixes that error.