Validation utility