"No data value" was considered as a real value in contour computation. As a result, a contour line was created around the NaN region. It's fixed by adding the "No data value" to the list of "No Data" of the Contour operator.