Well I'm not sure I understand you.
What are you checking for?
(And frankly, it's not my job to understand your question, but your job to make me understand. The onus is on you, the question asker, to make sure that your question is clear, and not on me to figure it out.)
OK. (See, you could explain it more and now it makes excellent sense.)
In your class case you want to, ideally, avoid situations like that, where you need to delete *conditionally* (chances are that wouldn't happen anyway) but the technique for what you are trying to do is, in some ways, related to runtime type ID (RTTI). RTTI is for determining the dynamic type of a base-class object at runtime. However, I am not sure how to resolve your problem.
The solution is to write a template specialization for the worrisome types in question (in this case, pointers of some kind). Unfortunately you may end up writing tons of specializations. Here's the article on templates for you to analyze: http://www.cplusplus.com/doc/tutorial/templates/
In the concept you provide I would generally not find any case in which that would happen because all the dynamic allocation happens in the class's own construction and methods no? You cannot choose to pass a dynamically allocated "type" to a class, I believe. (Unless you passed an object containing DMA'd stuff, in which case that class's destructor should handle the deallocation.)
How do you know the pointer was dynamically allocated? How do you know it was allocated by new? What if it was allocated by new[] or malloc()?
Trust me. You don't want to do this.
I second helios; be very clear about your dynamic allocation if you are going to use it because there is no way to tell if it was dynamically allocated.
It doesnt' work like that. What you do is define a template with default behaviour, then define alternative versions depending on the properties of the types.
You wouldn't expect to see an if ... else if ... type structure, but a set of different versions.
If you can provide a more concrete example of your problem, I can give a more specific answer. In the mean time, there's an example here: http://www.cplusplus.com/forum/general/13429/