simplify replaceNode method
Prints casts as 'x as Type'
convert String.class to typeof(String)