Remove unnecessary type casting.