get _ipython_display_ method safely

use the same method we use for `_repr_foo_`

closes #5227