Fix optional argument issue in doesrowexist()