title: LEFT JOIN should return null, but returns object with nested properties that have null values
body: <p>I have two tables,</p>
  <pre><code>CREATE TABLE IF NOT EXISTS my_schema.layout (
      id serial PRIMARY KEY,
      layout_name VARCHAR (50) UNIQUE NOT NULL
  );
  
  CREATE TABLE IF NOT EXISTS my_schema.page (
      id serial PRIMARY KEY,
      layout_id BIGINT REFERENCES my_schema.layout (id)
  );
  
  INSERT INTO my_schema.layout VALUES
      (1 ,'basic'),
      (2 ,'header');
      
  INSERT INTO my_schema.page VALUES
      (1, 1),
      (2, null);
  </code></pre>
  <p>As you can note, <code>page</code> record with id <code>2</code> has a <code>null</code> value for the column <code>layout_id</code>.</p>
  <p>But, when I execute my query, I get the following results:</p>
  <pre><code>id  layout
  1   {&quot;id&quot; : 1, &quot;layout_name&quot; : &quot;basic&quot;}
  2   {&quot;id&quot; : null, &quot;layout_name&quot; : null}
  </code></pre>
  <p>But I except the result output to be:</p>
  <pre><code>id  layout
  1   {&quot;id&quot; : 1, &quot;layout_name&quot; : &quot;basic&quot;}
  2   null
  </code></pre>
  <p>Here's my query:</p>
  <pre><code>SELECT
      p.id,
      json_build_object(
          'id', l.id,
          'layout_name', l.layout_name
      ) as layout
  FROM my_schema.page p
  LEFT JOIN my_schema.layout l
      ON l.id = p.layout_id
  </code></pre>
  <p>I've also tried <code>COALESCE</code>, but that kept throwing an error. What can I do here?</p>