Minor JSON type checking overhaul

and some general cleaning / simplification

todo:
* [x] array type checks
* [x] copy constructors