Do not call `#nil?` extra times.

...in case `nil?` is expected a set number of times.

Fixes #224.