Guard the client against wrong input