Avoid a Ruby warning when accessing an unset instance variable.

In fact, this way is actually faster:
https://gist.github.com/djanowski/8126933