Fixing nil[] in list.rb