Consistent ML estimator for drift parameters of both ergodic and nonergodic diffusions