title: jetbrains exposed - select based on nullable reference column
body: <p>I'm trying to select the rows from a table based on a nullable referenced column. 
  If you replace the reference with just a standard integer column and keep it nullable, it handles the eq just fine. I've also tried replacing the reference with optReference, but that didn't make a difference.</p>
  
  <p>The error is given by the compiler.</p>
  
  <pre><code>None of the following functions can be called with the arguments supplied.
  Expression&lt;in EntityID&lt;Int&gt;?&gt;.eq(Expression&lt;in EntityID&lt;Int&gt;?&gt;)   where T = EntityID&lt;Int&gt;?, S1 = EntityID&lt;Int&gt;?, S2 = EntityID&lt;Int&gt;? for    infix fun &lt;T, S1 : T?, S2 : T?&gt; Expression&lt;in S1&gt;.eq(other: Expression&lt;in S2&gt;): Op&lt;Boolean&gt; defined in org.jetbrains.exposed.sql.SqlExpressionBuilder
  ExpressionWithColumnType&lt;T&gt;.eq(T)   where T cannot be inferred for    infix fun &lt;T&gt; ExpressionWithColumnType&lt;T&gt;.eq(t: T): Op&lt;Boolean&gt; defined in org.jetbrains.exposed.sql.SqlExpressionBuilder
  ExpressionWithColumnType&lt;EntityID&lt;Int&gt;&gt;.eq(Int?)   where T = Int for    infix fun &lt;T : Comparable&lt;T&gt;&gt; ExpressionWithColumnType&lt;EntityID&lt;T&gt;&gt;.eq(t: T?): Op&lt;Boolean&gt; defined in org.jetbrains.exposed.sql.SqlExpressionBuilder
  </code></pre>
  
  <p>A basic working example showing the error given by Intellij.</p>
  
  <pre><code>object A : IntIdTable("a") {
      val n = varchar("n", 255)
      val x = reference("x", B).nullable()
  }
  
  object B : IntIdTable("b") {
      val i = varchar("m", 255)
      val y = integer("y")
  }
  
  fun main() {
      connectToDatabase()
  
      transaction {
          SchemaUtils.createMissingTablesAndColumns(A, B)
  
          A.select { A.x eq 1 }
      }
  }
  </code></pre>
  
  <p>The equivalent sql I'm want it to run is:</p>
  
  <pre><code>select * from test.a as a where a.x = 1;
  </code></pre>