Safe guard some wild and ugly casts