Added input validation for recipes