renames
removing unnecesary elses to avoid dead kittens
changed code formatting preferences
#refactor: extract method
generalizing the extracted method
#refactor, extract method
adding tests for the null and empty string cases
#refactor, extract method
using LINQ to get the length of the nonempty string and generalizing the method