The nonlinear Schrödinger equation with polynomial law nonlinearity: localized chirped optical and solitary wave solutions