Part of MDL-55611 epic.
The typeid=0 is a valid and common value representing "Automatic, based on launch URL" type. In that case, no record in the lti_types table is found. Thence attempting to access its toolproxyid property used to throw PHP notice.