Helpers for validation