Attempt to read property "category_id" on null