more error reporting & testing for json casts; added alistFromObject