fix script error on ajax 204 result parsing

When the server returns no content (http code 204) the results are an empty string.  `JSON.parse('')` throws.  This fix handles ajax results with empty string.