Avoiding omplied typecasting