Checked can_introspect_null feature in a test.

Forward-port of 1238f92c from stable/1.7.x.
Replaced an explicit vendor check by a feature flag.

Forward-port of c9aedce0 from stable/1.7.x.