Validation helper method added