added type check for values in client call function