Fix for length check on null string in dictionary