Handle ranges for empty property values and fix some more unit tests.
And also address two review feedbacks.