Improve handling of object-typed nil values during argument matching

The existing tests around the usage of nil generally use a simple `nil` literal, which seems to be treated as type `int` by the compiler. I've fixed behavior and crashes around the usage of nil which is typed as `id`.