refactored Action.isVisible

A new util class is added.