You can shorten to

if (!requireReturn && !functionData.returnPresent)