I have a webpage that I'm loading information onto via an ajax call to a database. I'm pulling a singular object and if a specific field in that object is either null or empty I won't populate that portion of the page. For instance, let's say we have an object named Hamburger with fields topBun = "kaiser", middle = null, and bottomBun = "kaiser". I want to set each field based on these results.
In my head I'm thinking I'll have to do an if([variable] == null){ //set variable to page}. What I'm wondering is if there is a more simple or refined way to do this?