Check length of resulting string before removing the last '.'

The resulting string could be empty when `expression.GetExpressionChain` returns an empty list.
This happens e.g. when the method is called with an expression like `x => x`
Merge pull request #741 from eggapauli/FixExpressionToPropertyNames

Check length of resulting string before removing the last '.'