added NaN test for check_nonzero_size
added NaN test for check_row_index
added NaN test for check_square