Fix issue when the result set includes null values
Extend .gitignore to cover NCrunch and StyleCop scenarios
Move explicit case inside the for-loop in case it fails