It seems that if you have a new record you are unable to create an entity from it. I have tried both .get and .query. In my case I’m trying to test for values before saving the record. This is web-based not a form.
$liltter is null for a new record but works okay have a record. Same for query. See image below.
For example I am trying to do
If ($litter.MotherID=Null) //ORDA