Stricter checks with type casting
Triggers warning an doesn't cast, if casting doesn't make much sence.
Fix issue with TypeCastingImpl