TypeError in Shelf#category_detail

Showing /app/app/views/shelf/_detaillist.html.erb where line #39 raised:

no implicit conversion of nil into String
Extracted source (around line #39):
37
38
39
40
41
42
              
book = Book.where(:isbn => isbn)[0]
if book.nil? then
link_to '('+isbn+'登録)', :shelfname => shelfname, :action => 'newbooks', :isbn => isbn
else
link_to origdesc!='' ? desc : book.title, :shelfname => shelfname, :action => 'edit', :isbn => isbn
end

Trace of template inclusion: app/views/shelf/category_detail.html.erb

Rails.root: /app

Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"category"=>"09_娯楽", "shelfname"=>"SKZ"}

Response

Headers:

None