could be a vacuum leak. but also, i think all nissans have a Idle Air Control Valve which controls idle. if that is clogged it could cause it. matter of fact, anything clogging the air stream would cause it. you also might want to try cleaning the throttle body and changing the PCV valve.
good luck...