Adds validateHosted, validateHostedUrl, and validateSigned to validate specific types
invert some if conditions to match code style better
Merge pull request #8 from stenington/validate-expected-type

Validate expected type