fix kvlang using hasattr to determine if eventdispatcher