more tests for if, castnode, error handling fix for castnode