Return null when null was passed to Marshal.PtrToStructure () instead of throwing an exception. Fixes #11417.