Better erroring
__toJson() implementation