Catch empty name part in formatName.

Panicking when db field name ends in an underscore