Attempt to read property "id" on null