Remove unneeded type assertion.