[Solved] Querying a field from the current page. Surely I'm missing something

By the way, this is the code that I ended up with in case anyone needs it. A checked Boolean field turns the box black, a false one turns it yellow.

$w.onReady( () => {
  $w("#dynamicDataset").onReady( () => {
 let itemObj = $w("#dynamicDataset").getCurrentItem().creases;
 if(itemObj===true){
     $w("#box2").style.backgroundColor = "#ffff";
     console.log("it's true");  
     } 
 else{ 
     $w("#box2").style.backgroundColor = "#ef0"; 
     console.log("it's false"); 
     }
  } )
} );