handling json nulls + more verbose error messages