conditionally showing the type