Throw a runtimeException if data passed to fromJson method isn't json

Avoids the error `Fatal Error: 'Argument 2 passed to CG\Slim\Renderer\ResponseType\Hal::__construct() must be of the type array, null given, called in /var/www/app/current/vendor/nocarrier/hal/src/Nocarrier/Hal.php on line 116`