Why do you think this is the right behaviour? If I have 3 things that I want to sort by "a" and one of them doesn't have "a", I would expect this to blow up, not to treat the thing without the "a" as the smallest one. Ruby does the same.
```
irb(main):001:0> [{"a" => 2}, {"b" => 1}, {"a" => 1}].sort_by{ |h| h['a'] }
ArgumentError: comparison of Fixnum with nil failed
```
I would ask why there is something without an "a" property in that list to begin with.