Nonparametric Rank Test for Nonlinearity Detection