Update Client.cs

Isn't it better to receive InvalidCast than return null and then get weird NullReference somewhere else?