Check string contains Null,empty and spaces.
null,empty, and spaces are different so check each before inserting data into database
For null or empty data use -
String.IsNullOrEmpty("") which returns true value
If data is empty or null otherwise returns false.
For spaces -
But if data contains space it returns false using above function. To avoid it use
String.IsNullOrEmpty(" ".Trim) then and then it return true.