Indeed, that + pattern matching does error checking just right.
I must admit that the automatic JSON decoding initially turned me off a bit!