added NaN test for logit
added NaN test and doc for logit