Added 201 check before parsing JSON

Also added an empty array if it's not 201, just so the property exists at least.