500 PHP Error
Trying to get property 'type_id' of non-object