Always use type field in parameter objects
Added some guarding for parameters
Added ToParameter unit tests
Merge pull request #28 from TimSchlechter/parameter-type-fixes

Parameter type fixes