[minor] If customer has removed getting an error (#10107)

diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.js b/erpnext/accounts/doctype/tax_rule/tax_rule.js
index 935ea62..16041a8 100644
--- a/erpnext/accounts/doctype/tax_rule/tax_rule.js
+++ b/erpnext/accounts/doctype/tax_rule/tax_rule.js
@@ -20,20 +20,22 @@
 })
 
 frappe.ui.form.on("Tax Rule", "customer", function(frm) {
-	frappe.call({
-		method:"erpnext.accounts.doctype.tax_rule.tax_rule.get_party_details",
-		args: {
-			"party": frm.doc.customer,
-			"party_type": "customer"
-		},
-		callback: function(r) {
-			if(!r.exc) {
-				$.each(r.message, function(k, v) {
-					frm.set_value(k, v);
-				});
+	if(frm.doc.customer) {
+		frappe.call({
+			method:"erpnext.accounts.doctype.tax_rule.tax_rule.get_party_details",
+			args: {
+				"party": frm.doc.customer,
+				"party_type": "customer"
+			},
+			callback: function(r) {
+				if(!r.exc) {
+					$.each(r.message, function(k, v) {
+						frm.set_value(k, v);
+					});
+				}
 			}
-		}
-	});
+		});
+	}
 });
 
 frappe.ui.form.on("Tax Rule", "supplier", function(frm) {