add 'undefined' value support for the case when there are not enough inputs to lambda function