Detect static method calls more precisely using Dispatch enum

Previously the checks only check for no actual parameters. But that is
not valid since sometimes for a static method you can have actual
parameters. If you really want to check for static method, you should
check its dispatch.