Removing duplicate code.

`type` contains a check that's done twice for some reason. This removes the second call.