Change internal representation of mask when mask is None to appropriate numpy constant

Closes #2417

Part of the fix that closes this issue accidentally ended up in 2f55aa2