Check the client is null to avoid crash