added NaN test for check_nonzero_size
added doc in code for check_nonzero_size