Added contracts for type conversion.
Merge pull request #10 from isupeene/conversion_contracts

Added contracts for type conversion.