Merge "Check for exceptions before calling NewObject"