Check for declaration and execution errors