added type checking when "native" objects are passed as parameters