The error may be caused because the attribute H1bCapExpirationDate = empty.
A solution would be to add a check before this action, for instance
if H1bCapExpirationDate != empty then
First, You have to check date attribute which is H1BCapExpiritationDate Empty or not
You are facing a null point exception error. This error usually will occur in runtime only. You are doing the addDays function, and on there that input parameter value does not available, Which means “$ItrratorNonImigratVisaInformation/H1bCapExpirationDate ” is empty.
Try to add a value for that, then this error will be resolved. Usually processing the non-mandatory fields within the functions, is do with the check condition before itself as mentioned by Ayco Geul.
I hope this info will help you.
Thanks & Regards
Thank You for your help, I added the condition to check the value is empty and that got rid of the error.