I'm reading someone else code from a website they posted on reddit that they made to create a random name generator. I understand most of what's going on except for the select validation. Here's the link to the website. <http://saturdaykid.com/usernames/generator.html>. I'm still very new to JavaScript but this website is giving me a good idea of how JavaScript is used in a website. 

I don't understand what's going on in the if statement. In the Markup there is no class names for the select elements or option elements that I can see. So basically, I'm not understanding the if statement is `if (!selectedAdj)`verifying if the value of this element is null? why does it create a className if there is none originally in the markup?

```
if (!selectedAdj) {
        var adj = document.getElementById("adjective");
        adj.className = "notSelected";
        return false;
    } else {
        var adj = document.getElementById("adjective");
        adj.className = "";
    }

```

Here's the entire function 

```
// Ensures the user has chosen an adjective and a noun    
var validate = function() {
    var adjectives = document.getElementById("adjective");
    var selectedAdj = adjectives.options[adjectives.selectedIndex].value;
    if (!selectedAdj) {
        var adj = document.getElementById("adjective");
        adj.className = "notSelected";
        return false;
    } else {
        var adj = document.getElementById("adjective");
        adj.className = "";
    }
    var nouns = document.getElementById("noun");
    var selectedNoun = nouns.options[nouns.selectedIndex].value;
    if (!selectedNoun) {
        var noun = document.getElementById("noun");
        noun.className = "notSelected";
        return false;
    } else {
        var noun = document.getElementById("noun");
        noun.className = "";
    }
    generator(selectedAdj, selectedNoun);
};

```