Improve exceptions in utils::Json*_element