Fix error when clients have no associated user

The user field of the Client model is mark as nullable. However, during
serialization it is expected to be a dictionary, throwing an
error.

Fixed by checking if the user is None and serializing as null.