Fixes in Activity Cost
diff --git a/erpnext/projects/doctype/activity_cost/activity_cost.py b/erpnext/projects/doctype/activity_cost/activity_cost.py
index f2c5099..862a707 100644
--- a/erpnext/projects/doctype/activity_cost/activity_cost.py
+++ b/erpnext/projects/doctype/activity_cost/activity_cost.py
@@ -29,7 +29,7 @@
 					frappe.throw(_("Activity Cost exists for Employee {0} against Activity Type - {1}")
 						.format(self.employee, self.activity_type), DuplicationError)
 		else:
-			if frappe.db.sql("""select name from `tabActivity Cost` where employee_name IS NULL and activity_type= %s and name != %s""",
+			if frappe.db.sql("""select name from `tabActivity Cost` where ifnull(employee, '')='' and activity_type= %s and name != %s""",
 				(self.activity_type, self.name)):
 					frappe.throw(_("Default Activity Cost exists for Activity Type - {0}")
 						.format(self.activity_type), DuplicationError)
diff --git a/erpnext/projects/doctype/time_log/time_log.py b/erpnext/projects/doctype/time_log/time_log.py
index e863561..841ef28 100644
--- a/erpnext/projects/doctype/time_log/time_log.py
+++ b/erpnext/projects/doctype/time_log/time_log.py
@@ -273,6 +273,6 @@
 	rate = frappe.db.sql("""select costing_rate, billing_rate from `tabActivity Cost` where employee= %s
 		and activity_type= %s""", (employee, activity_type), as_dict=1)
 	if not rate:
-		rate = frappe.db.sql("""select costing_rate, billing_rate from `tabActivity Cost` where employee IS NULL
+		rate = frappe.db.sql("""select costing_rate, billing_rate from `tabActivity Cost` where ifnull(employee, '')=''
 			and activity_type= %s""", (activity_type), as_dict=1)
 	return rate[0] if rate else {}