Checking for nil case

Nil doesn't have any of the sanitizable methods most likely, so skip them when the value being set is nil.