Small correction to is_ type checks involving named types, fixes #342