adds undefined checking condition for funcwrap