I think it's because of the use of LanguagePrimitives instead of just `as` https://github.com/Azure/azure-functions-powershell-worker/blob/dev/src/Utility/TypeExtensions.cs#L130