Add graph validation