I've often been told that it's a bad practice to use the lack of data to mean something. An undef means we have no data. If you want it to mean something else, as you do here, I think it's a lot better to make some data that explicitly means "no answer" as
suggested. It's also probably wise to steer clear of the kind of trickery that would be required to do what you asked for originally, since it's likely to be a brittle solution.