Use output_type instead of name for detecting output type