Should we validate the data first which is in excel and then add the data to queue

Hi guys,

I am intentionally adding an empty value/removed a value in the excel which has some data and I am trying to add that excel data to the queue, It gives an error like cannot convert from DBnull to Integer, Can’t I add an empty value to the queue or should I validate first whether there is an empty value in the excel and then add to queue?



If bot is not allowing empty/blank value to queue then you can check if current value is empty or not.
if not, then add that to queue.

Then how can I make this as a Business Rule Exception, because I want to consider that if there is an empty value in the inputs from the excel it should be a Business Rule Exception.