Fixed #3427: add a condition to check parameter for addListener

Add a condition to check parameter for addListener