noDataValue could be null
(cherry-picked from af672f6)