Discord.js: "if (message.channel.name === '')" not working : <p>I'm trying to make a bot not respond if the message isn't in a channel, for some reason using </p>

<pre class="lang-js prettyprint-override"><code>if (message.channel.name === '')
</code></pre>

<p>doesn't work. I can see the channel  name by using if I console log it, so I don't understand why it's not working, and I get no errors in the console. </p>

<p>Help would be greatly appreciated.</p>
