fix regression on handling wrong passed empty values and add specs
extracted methods should be private
Merge pull request #150 from klausmeyer/fix-empty-params

fix regression on handling wrong passed empty values and add specs