diff --git a/src/app/services/util/profanity-filter.service.ts b/src/app/services/util/profanity-filter.service.ts
index 3d710236f1c748f182ee6de2f2463f3ed72e834b..0e1237e348979f6a7ef645127c2320529d40aa60 100644
--- a/src/app/services/util/profanity-filter.service.ts
+++ b/src/app/services/util/profanity-filter.service.ts
@@ -77,7 +77,7 @@ export class ProfanityFilterService {
       profWords = this.profanityWords;
     }
     const list = profWords.concat(this.getProfanityListFromStorage());
-    if (list.length < 1) {
+    if (list.length < 1 || !str) {
       return [str, false];
     }
     const escapeRegex = /[.*+\-?^${}()|\[\]\\]/g;