Added check for null property values during QueryEncoder's encodeProperties.