Local approximation of superharmonic and superparabolic functions in nonlinear potential theory