I'd probably prefer a `try`/`except` approach here. Let's see if we can deserialize the thing, and if not, assume it's a `Client`. The current approach could end up trying to deserialize all kinds of things that aren't `Client`s even if we intentionally passed one in (e.g. a mock object showing the `Client` interface).