Defensive code