Put in a better fix for dealing with null values and non-trimmed strings