Test-Path is your friend whenever you want to check whether a file or folder exists:
Test-Path C:windows
Test-Path can check a lot of other things as well, though. It accepts any PowerShell drive, and as you may know, in PowerShell drives are not restricted to the filesystem.
To check whether an environment variable exists, use this:
To check for an alias, use this:
You can even check for registry keys like this: