Coding Convention Conversion In that Coding Golf, you should convert one coding convention with TitleCase to lower_case_with_underscores. And... vice versa!
Specification
Change the casing in a following way:

If underscore character is a delimiter, change the casing to Title Case without any of delimiter.
If there are multiple words with no delimiter, change the casing to lower case and add an underscore character as a delimiter.
In case of only one word (or one character): change the casing to Title Case if the word starts with lower case; change the casing to lower case if the word starts with the upper case.

Allowed characters:

A to Z
a to z
underscore (_).

Input with mixed cased words are disallowed. Examples of disallowed cases:

Coding_Convention_Conversion
a_BC

Example Cases
Input                        | Expected Output
===========================================================
CodingConventionConversion   | coding_convention_conversion
coding_convention_conversion | CodingConventionConversion
abc                          | Abc
Abc                          | abc
ABC                          | a_b_c
a_b_c                        | ABC
a                            | A
A                            | a

Rules

It is allowed to use ToUpper, ToLower and ToTitleCase functions.
Using regular expressions is allowed.
code-golf: shortest code in bytes wins!
Jolf, 35 bytes

Saves 1 byte thanks to @Cᴏɴᴏʀ O'Bʀɪᴇɴ. This is encoded in ISO 8859-7.

? hI'_ΜGI'_dpyH0pxRGIL0"(?=[A-Z])'_


Woohoo my first Jolf program!

Explanation

   // I = input
? hI'_                              // If input contains _
       GI'_                          // Split on _
      Μ    d                         // Loop, then join
            pyH0                     // Make the first character uppercase
                                    // ELSE...
                  RGIL0"(?=[A-Z])    // Split *after* all uppercase chars
                                 '_  // join with _ 
                px                   //Make lowercase


Try it online