js api check for empty server message