small bugfixes

Added some null checking and fixed a bug in SmaliVM which caused wrong
parameter names and types on method definitions.