The -as parameter is not widely known but is extremely versatile. It tries to convert data into a .NET type, and when it fails, it simply returns $null. This way, you can create your own functions to test data types. For example, you should use the following...