detect whether a value is a pointer