It could also be written as

(isNaN(x) || x == null)

but we don't allow double-equals comparison to null in dygraphs.