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