def METHOD_NAME(path: str) -> bool:
    """Whether this is a valid object path.
    .. seealso:: https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-marshaling-object-path
    :param path: The object path to validate.
    :type path: str
    :returns: Whether the object path is valid.
    :rtype: bool
    """
    if not isinstance(path, str):
        return False
    if not path:
        return False
    if not path.startswith("/"):
        return False
    if len(path) == 1:
        return True
    for element in path[1:].split("/"):
        if _path_re.search(element) is None:
            return False
    return True