Defensive programming in Grid