some typdef cast checks