added clang casting and type checking support to ast classes