riginal.clear()<br>assertNotEquals(illegal = "$original", actual = "$notEmptyMap")</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">You can use the <a href="create-or-null.html">NotEmptyMap.Companion.createOrNull</a> function for returning <code class="lang-kotlin">null</code> instead of throwing an exception in case of 