Adds hasListener() method