[minor] fix
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index 8b4e6cb..7ea0c66 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -14,6 +14,9 @@
 def get_party_details(party=None, account=None, party_type="Customer", company=None,
 	posting_date=None, price_list=None, currency=None, doctype=None):
 
+	if not party:
+		return {}
+
 	return _get_party_details(party, account, party_type,
 		company, posting_date, price_list, currency, doctype)
 
@@ -161,6 +164,9 @@
 	return due_date
 
 def get_credit_days(party_type, party, company):
+	if not party:
+		return None
+
 	party_group_doctype = "Customer Group" if party_type=="Customer" else "Supplier Type"
 	credit_days, party_group = frappe.db.get_value(party_type, party, ["credit_days", frappe.scrub(party_group_doctype)])