check for null instead of empty string