Check type of data, return proper type
Improve check type of data
Merge pull request #2 from benoitchantre/keep-types

Check type of data, return proper type