Changed default nan and inf replacement to null