validate nested array values in INSERT and UPDATE statements