fixed crash when creating new object with wrong number of arguments (rebased)
Created by: koalefant
If .new() call fails engine crashes while accessing null pointer.
Repro is here: https://github.com/koalefant/godot-bug-new-arguments
Fixes #2280 (closed)
(Previous pull request: https://github.com/godotengine/godot/pull/2935)