cast JS objects to a specified schema, ahoy!