return zero when data is nil