Fix NPE on bad parsing in main
Catch MarshalExceptions and return null
Move to strict version 1.0 encoding (Fix #11322)