This sounds similar to something I just responded to wondering if you could tell from a script whether there was anything overdubbed above the noise floor. Short answer, no, I can't think of anything off the top that would let you inspect what is in the current record layer. That would be very useful though to determine what Undo is going to do. There are lots of things that could be in there...one or more overdubs, one or more Replace segments, one or more quantized function events, etc.
Not only should there be variables to inspect this, but probably also some arguments to Undo so you can decide how to handle them.