Only try to get wallet from daemon in the `command` decorator if the wallet_path is available to prevent raising `TypeError` when `daemon.get_wallet(path=None)` gets called. Fixes https://github.com/spesmilo/electrum/issues/10012