```python
def dict_depth(d):
    """
    Calculates the depth of a dictionary.
    The depth is the maximum number of nested dictionaries.
    An empty dictionary or a dictionary with no nested dictionaries has a depth of 1.
    """
    if not isinstance(d, dict):
        return 0

    if not d:
        return 1

    depths = [dict_depth(v) for v in d.values() if isinstance(v, dict)]

    return 1 + (max(depths) if depths else 0)

```