Fix for nil values
Merge pull request #1111 from jdalphon/sanitize

Fix for nil values in sanitize