I would like to create a helper class to do some common task.
For example, I am retrieving some results from Database and then assigning the values to variables. Bu
A more radical approach (which would remove the issue) would be to eradicate NULLs from your values altogether.
The simplest way would be through ISNULL() when you query your database:
Where now you do
SELECT MyColumn FROM MyTable
You instead go
SELECT ISNULL(MyColumn, '') AS MyColumn FROM MyTable
Then you can assume no NULLs will get through to your code.