I'm not sure you want to change these.  `nullable` returns a `Boolean`, not an `Expression`.  This code is only compiling because the `Boolean` values are getting implicitly converted to a `Literal`.