Get the type of the current HDU (either Image or Bintable).
The output of this function can be tested for equality, e.g.: