.NET Framework provides String.IsNullOrEmpty() method which return true if the string is null or empty. It does not however take care of a string which only contains spaces. Often while persisting data we do not want to persist just empty strings. In past I have made this check before I let my data pass through. Today I thought of creating an extension method to do the same for me.