TypeError in Shelf#edit

Showing /app/app/views/shelf/edit.html.erb where line #125 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

Rails.root: /app

Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"shelfname"=>"mr_bookshelf", "isbn"=>"4102159746"}

Response

Headers:

None