Simple all-purpose data validation (lambda-based)