Error Call to a member function getTitolo() on null