Error thrown

Call to a member function display() on null