Updated input checking for next record at invoke