Python Client Code - minor modification to safe-guard against empty string