diff --git a/src/scripts/weight.html b/src/scripts/weight.html
index cac05a419..a00888999 100644
--- a/src/scripts/weight.html
+++ b/src/scripts/weight.html
@@ -16,84 +16,98 @@
 
 
 
\ No newline at end of file
diff --git a/src/services/attributes.js b/src/services/attributes.js
index 06322349c..a1c26b26e 100644
--- a/src/services/attributes.js
+++ b/src/services/attributes.js
@@ -53,6 +53,10 @@ async function getNoteIdsWithAttribute(name) {
 }
 
 async function createAttribute(noteId, name, value = "", sourceId = null) {
+    if (value === null || value === undefined) {
+        value = "";
+    }
+
     const now = utils.nowDate();
     const attributeId = utils.newAttributeId();