Rubyの真偽値
false
または
nil
なら偽、それ以外は全て真。
if a != nil
の代わりに、
if a
と書ける。
参考URL
Ruby用語集 真偽値
#Rubyを学ぶ