Fix: Fields order doesn't matter for json. Test for valid dict and data only