Fixed issue 1441. Forced check that value was of an appropriate type.
Merge pull request #1442 from eldritchideen/issue_1441

Fixed issue 1441. Forced check that value was of an appropriate type.