Added 'isNewRecord' function.