Unexpected runtime error

The runtime has encountered an unexpected error.

Error source

Page Name:/estrenos.xsp
Control Id: image3
Property: url

Exception

Error while executing JavaScript computed expression
Script interpreter error, line=2, col=79: 'doc.getFirstItem()' is null

Javascript code

   1: var doc:NotesDocument = peli.getDocument();
   2: "/0/"+doc.getUniversalID()+"/$FILE/"+@Trim(@Word(doc.getFirstItem("Caratula").getText(),"-",2));

Stack Trace