bugfix: Test for `undefined` type when checking if method has arguments or not.
Small style changes.