Added prevention for nullpointer conditions to ASTObject