A Boolean value indicating whether the dictionary has no key-value pairs.
The isEmpty property returns true if the dictionary contains no key-value pairs, and false otherwise. It is preferred over checking count == 0 for clarity.
For Dictionary, both isEmpty and count are O(1), but isEmpty better communicates intent.
isEmpty is available on all Collection types in Swift.
var config: [String: String] = [:]
print(config.isEmpty) // true
config["theme"] = "dark"
print(config.isEmpty) // false