Make sure we ignore invalid event listeners