Add type parsing for config

Not only dict
Maybe break BC
Tests for config